Diffusion .NET Client Library
6.1.5
|
A script builder may be used to create a script of commands to apply to the security store at the server. More...
Inherited by PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.SecurityControl.ScriptBuilderImpl.
Public Member Functions | |
IScriptBuilder | SetRolesForAnonymousSessions (IEnumerable< string > roles) |
Sets the roles to be assigned by default to all anonymous sessions. More... | |
IScriptBuilder | SetRolesForNamedSessions (IEnumerable< string > roles) |
Sets the roles to be assigned by default to all named sessions. More... | |
IScriptBuilder | SetGlobalPermissions (string role, IEnumerable< GlobalPermission > permissions) |
Sets the global permissions to be assigned to a named role. More... | |
IScriptBuilder | SetDefaultTopicPermissions (string role, IEnumerable< TopicPermission > permissions) |
Sets the default permissions to be assigned to a named role. More... | |
IScriptBuilder | SetTopicPermissions (string role, string topicPath, IEnumerable< TopicPermission > permissions) |
Sets specific topic permissions to be assigned for a named role. More... | |
IScriptBuilder | RemoveTopicPermissions (string role, string topicPath) |
Removes any previously assigned permissions to a particular topic for a given role. More... | |
IScriptBuilder | SetRoleIncludes (string role, IEnumerable< string > includedRoles) |
Sets the roles that are to be included within a specific role. More... | |
string | Script () |
Create a script. More... | |
A script builder may be used to create a script of commands to apply to the security store at the server.
Each method call on the builder adds a line to the script and then the script may be built using the Script method which produces a string script which may be sent to the server using ISecurityStoreFeature.UpdateStore.
Such a builder may be created using ISecurityControl.ScriptBuilder.
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.RemoveTopicPermissions | ( | string | role, |
string | topicPath | ||
) |
Removes any previously assigned permissions to a particular topic for a given role.
This is different from setting no permissions to a topic for a role. By removing permissions set for a particular node in the topic tree the permissions become deferred to superior nodes in the tree or to the default topic permissions
role | The role to remove topic permissions from. |
topicPath | The topic for which permissions are to be removed. |
string PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.Script | ( | ) |
Create a script.
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetDefaultTopicPermissions | ( | string | role, |
IEnumerable< TopicPermission > | permissions | ||
) |
Sets the default permissions to be assigned to a named role.
The role will have the given permissions to all topics unless specifically overridden for named paths.
role | The role. |
permissions | The default permissions to be assigned to the role. This may be empty which would mean that the named role will be assigned no default topic permissions. |
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetGlobalPermissions | ( | string | role, |
IEnumerable< GlobalPermission > | permissions | ||
) |
Sets the global permissions to be assigned to a named role.
role | The role. |
permissions | The global permissions to assign to the role. This may be empty which would mean that no global permissions are to be assigned to the role. |
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetRoleIncludes | ( | string | role, |
IEnumerable< string > | includedRoles | ||
) |
Sets the roles that are to be included within a specific role.
role | The role. |
includedRoles | The roles to include. This may be empty, which would meean that the given role should not include any other roles. |
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetRolesForAnonymousSessions | ( | IEnumerable< string > | roles | ) |
Sets the roles to be assigned by default to all anonymous sessions.
roles | The roles to be applied to anonymous sessions. This may be empty which would mean that no roles are to be assigned by default to anonymous sessions. |
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetRolesForNamedSessions | ( | IEnumerable< string > | roles | ) |
Sets the roles to be assigned by default to all named sessions.
roles | The roles to be assigned to all named sessions. This may be empty which would mean that no roles are to be assigned by default to named sessions. |
IScriptBuilder PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl.IScriptBuilder.SetTopicPermissions | ( | string | role, |
string | topicPath, | ||
IEnumerable< TopicPermission > | permissions | ||
) |
Sets specific topic permissions to be assigned for a named role.
When permissions are assigned to a role for a topic path they will apply to the topic and any topics below the specified topic in the topic tree. Topic scoped permissions are assigned to roles for specific topic paths. The permission assignment applies to all descendant topics, unless there is a more specific assignment.
To evaluate whether a client session has access to a permission for a topic, the server starts at that topic and searches up the tree to find the nearest permission assignment. The first assignment is the only one considered, even if the client has roles involved in assignments further up the topic tree.
role | The role. |
topicPath | Specifies the point in the topic tree at which the permissions are to be applied for the named role. |
permissions | The permissions to assign to the role for the topic. This may be empty which would mean that the named role will have no permissions for the specified topic (i.e. unable to access the topic in any way), which is different from not having permissions specified for the topic (see RemoveTopicPermissions |
.