The SecurityUtility type exposes the following members.
Methods
Name | Description | |
---|---|---|
AllowPersonalization |
Checks if the currently active user should get access to the personalization system (top floating panel and related funcitionality). Checks if the user is admin or can edit the current page.
|
|
AllRoleIds |
Gets all role ids in an Guid array.
|
|
CreateAccount(String, String, String, Boolean, Action<(Of <<'(MembershipUser>)>>), MembershipUser%, String%) |
Creates account and performs a customAction delegate upon successfull creation.
If activation is required, an activation e-mail is sent, otherwise newly created user is immediatelly approved.
|
|
CreateAccount(Guid, String, String, String, Boolean, Action<(Of <<'(MembershipUser>)>>), MembershipUser%, String%) |
Creates account and performs a customAction delegate upon successfull creation.
If activation is required, an activation e-mail is sent, otherwise newly created user is immediatelly approved.
|
|
FindAvailableUserName |
Checks if the preferredName is already taken in the users table and finds an available user name.
|
|
GenerateRandomPassword |
Generates a random password.
|
|
GetLoginUrl()()()() |
Get the form authentication login url.
|
|
GetLoginUrl(Boolean, Boolean, String) |
Get the form authentication login url.
|
|
GetLoginUrl(Boolean, Boolean, String, String) |
Get the form authentication login url.
|
|
GetRoleIds(String) |
Gets a list of all role Ids.
|
|
GetRoleIds(array<String>[]()[][]) |
Gets a list of all role Ids.
|
|
GetUserEmail()()()() |
Gets the member e-mail address.
|
|
GetUserEmail(Guid) |
Gets the member e-mail address.
|
|
GetUserEmail(String) |
Gets the member e-mail address.
|
|
GetUserId()()()() |
Retrieves the user's ID of the active user.
|
|
GetUserId(String) |
Retrieves user's ID by his username.
|
|
GetUserName()()()() |
Gets the member username.
|
|
GetUserName(Guid) |
Gets the member username.
|
|
GetUserProfile |
Retrieves the user profile for the currently active user.
|
|
HasNewsAccessPremissions(Boolean) |
Checks if provided user has news access permissions.
|
|
HasNewsAccessPremissions(String, Boolean) |
Checks if provided user has news access permissions.
|
|
InvalidateGetUserEmailCache(Guid) |
Invalidates get member e-mail address method cache.
|
|
InvalidateGetUserEmailCache(String) |
Invalidates get member e-mail address method cache.
|
|
InvalidateGetUserNameCache |
Invalidates get member username method cache.
|
|
IsAdManager()()()() |
Checks if the user with the specified username is in one of the ad manager roles.
|
|
IsAdManager(String) |
Checks if the user with the specified username is in one of the ad manager roles.
|
|
IsAdmin()()()() |
Checks if current user is in the admin role.
|
|
IsAdmin(String) |
Checks if the user with the specified username is in one of the admin roles.
|
|
IsAuthenticated |
Checks if the user is authenticated, taking care of the fact that the HttpContext.Current may not be valid at the time check is performed.
|
|
IsBlogAdmin()()()() |
Checks if current user is in the blog administrator role.
|
|
IsBlogAdmin(String) |
Checks if the user with the specified username is in one of the blog admin roles.
|
|
IsDiscussionAdmin |
Checks if current user is in the discussion administrator role.
|
|
IsEmail |
Checks if the string passed to the method is an e-mail address.
|
|
IsNewsEditor()()()() |
Checks if current user is in the news editor role.
|
|
IsNewsEditor(String) |
Checks if the user with the specified username is in one of the news editor roles.
|
|
IsNewsPublisher()()()() |
Checks if current user is in the news Publishers role.
|
|
IsNewsPublisher(String) |
Checks if current user is in the news Publishers role.
|
|
IsPageEditor |
Checks if the current user is full page editor in shared mode - the user must be admin or his role must be explicitly set in Page.EditRoles.
Similar to the AllowPersonalization, but returns true onlyu for the "real" editors - false is returned for users with partial privileges.
|
|
IsPhotoGalleryAdmin |
Checks if current user is in the photo gallery administrator role.
|
|
IsUserInRole(Guid) |
Checks if the currently active user is a member of the role with ID passed as a parameter.
|
|
IsUserInRole(String) |
Check if the currently active user is in role passed as a parameter.
|
|
IsUserInRole(String, Guid) |
Checks if the currently active user is a member of the role with ID passed as a parameter.
|
|
IsUserInRole(String, String) |
Check if the specified user is in role passed as a parameter.
|
|
IsUserInRoles(array<Guid>[]()[][]) |
Checks if the currently active user is a member of any of the roles with IDs in the array that is passedas a parameter.
|
|
IsUserInRoles(String) |
Checks if the currently active user is in any of the roles passed in the input parameter.
|
|
IsUserInRoles(array<String>[]()[][]) |
Checks if the currently active user is in any of the roles passed in the input parameter.
|
|
IsUserInRoles(String, array<Guid>[]()[][]) |
Checks if the currently active user is a member of any of the roles with IDs in the array that is passedas a parameter.
|
|
RemoveRoleIdFromCache |
Remove RoleId from cache.
|
|
SanitizeHtml(String) |
Encodes and sanitizes "unsecured" text that may be prone to XSS attacks if the user is not in the admin role.
|
|
SanitizeHtml(String, Boolean) |
Encodes and sanitizes "unsecured" text that may be prone to XSS attacks if the user is not in the admin role.
|
|
UpdateAccount |
Updates account in the following order: changes password, changes email and performs a custom action. If any of the steps fail, previous changes are rolled back.
|
|
UsernameCleanup |
Parses the user name passed as a paramter for the presence of e-mail address and returns the "real" username by looking it up in the database.
|
|
UserRoleIds()()()() |
Gets all role ids for current user
|
|
UserRoleIds(Guid) |
Gets all role ids for the specified user.
|
|
UserRoleIds(String) |
Gets all role ids for specified user.
|
Properties
Name | Description | |
---|---|---|
AllUsersRoleId |
Gets the Id of the "All Users" role.
|
|
AllUsersRoleName |
Gets the name of the "All Users" role.
|