Starting from 3.3.1 SCADA Final Aggregator API keys can have a special permission allow=supervisor, which provides the following features:
Supervisor can use SFA API to set supervisor lock and switch the server API in read-only mode. In read-only mode SFA API denies an access to functions, which modify item states (unit actions, set/reset/clear/toggle for lvars, macro run etc.) except caller is in the lock scope.
When supervisor lock is set, API function test returns field supervisor_lock with lock information. When there is no lock set, supervisor_lock field is null.
Supervisor lock can be cleared by any user, which is in the unlock scope. There is also not necessary clearing existing lock to set the new one - if user or API key is in the unlock scope, the lock can be overriden.
Both lock and unlock scopes can be:
null any supervisor can pass
k only supervisors with the same API key as the lock owner has
u only lock-owning user
To set user scope (“u”), API call must be performed with valid user token. Lock owner is set automatically using API call access data (key / user). Users with master key can override lock owner, setting lock user and key ID to any values.
Supervisor lock is automatically cleared when the server is restarted.
Users with master key are not affected with supervisor locks in any way and can pass / unlock them without any restrictions.
To let EVA JS framework receive supervisor events, it should be updated to version 0.3.7 or above.
sender message sender
key_id sender API key ID
u sender user
text message text
Users with master key can override message sender.
All supervisor methods can be also executed from the command line. See “eva sfa supervisor” command for more details.