-
Notifications
You must be signed in to change notification settings - Fork 1
SecurityExtensions
Nill edited this page Dec 29, 2021
·
1 revision
Used when building a bot using a BotConfigBuilder.
-
UseSecurity() - Adds the
StandardSecurityProviderto the Bot -
UseSecurity<TProvider> - Adds
TProvidersecurity provider to the Bot
-
HasAccess(item, permission[, bool]) - Checks that the current user has the required permission on the specified item and returns
true(permitted) orfalse(denied). -
AssertSecurity(item, permission[, bool]) - Checks that the current user has the required permission on the specified item and throws an
UnauthorizedAccessExceptionif they do not.
(Examples: Bot, Client)
-
AddStandardSecurity() - Adds the
StandardSecurityProviderto the security consumer. -
AddSingleOwnerSecurity([long]) - Adds the
SingleOwnerSecurityProviderto the security consumer with an optional initialOwnerId(user id of the owner).
Methods for helping to manage access lists.
-
AddUser(ISecurityPrincipal, Permission, AccessType, [DateTime]) - Adds a new entry for the
ISecurityPrincipalprovided. - AddUserId(long, Permission, AccessType, [DateTime]) - Adds a new entry for the numeric user id provided.
-
AddEveryone(Permission, AccessType, [DateTime]) - Adds a new entry for the
Everyonewell-known security principal. -
AddAuthenticated(Permission, AccessType, [DateTime]) - Adds a new entry for the
Authenticatedwell-known security principal. -
AddAnonymous(Permission, AccessType, [DateTime]) - Adds a new entry for the
Anonymouswell-known security principal.