The SecurityUtility type exposes the following members.

Methods

  Name Description
Public method Static member 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.
Public method Static member AllRoleIds
Gets all role ids in an Guid array.
Public method Static member 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.
Public method Static member 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.
Public method Static member FindAvailableUserName
Checks if the preferredName is already taken in the users table and finds an available user name.
Public method Static member GenerateRandomPassword
Generates a random password.
Public method Static member GetLoginUrl()()()()
Get the form authentication login url.
Public method Static member GetLoginUrl(Boolean, Boolean, String)
Get the form authentication login url.
Public method Static member GetLoginUrl(Boolean, Boolean, String, String)
Get the form authentication login url.
Public method Static member GetRoleIds(String)
Gets a list of all role Ids.
Public method Static member GetRoleIds(array<String>[]()[][])
Gets a list of all role Ids.
Public method Static member GetUserEmail()()()()
Gets the member e-mail address.
Public method Static member GetUserEmail(Guid)
Gets the member e-mail address.
Public method Static member GetUserEmail(String)
Gets the member e-mail address.
Public method Static member GetUserId()()()()
Retrieves the user's ID of the active user.
Public method Static member GetUserId(String)
Retrieves user's ID by his username.
Public method Static member GetUserName()()()()
Gets the member username.
Public method Static member GetUserName(Guid)
Gets the member username.
Public method Static member GetUserProfile
Retrieves the user profile for the currently active user.
Public method Static member HasNewsAccessPremissions(Boolean)
Checks if provided user has news access permissions.
Public method Static member HasNewsAccessPremissions(String, Boolean)
Checks if provided user has news access permissions.
Public method Static member InvalidateGetUserEmailCache(Guid)
Invalidates get member e-mail address method cache.
Public method Static member InvalidateGetUserEmailCache(String)
Invalidates get member e-mail address method cache.
Public method Static member InvalidateGetUserNameCache
Invalidates get member username method cache.
Public method Static member IsAdManager()()()()
Checks if the user with the specified username is in one of the ad manager roles.
Public method Static member IsAdManager(String)
Checks if the user with the specified username is in one of the ad manager roles.
Public method Static member IsAdmin()()()()
Checks if current user is in the admin role.
Public method Static member IsAdmin(String)
Checks if the user with the specified username is in one of the admin roles.
Public method Static member 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.
Public method Static member IsBlogAdmin()()()()
Checks if current user is in the blog administrator role.
Public method Static member IsBlogAdmin(String)
Checks if the user with the specified username is in one of the blog admin roles.
Public method Static member IsDiscussionAdmin
Checks if current user is in the discussion administrator role.
Public method Static member IsEmail
Checks if the string passed to the method is an e-mail address.
Public method Static member IsNewsEditor()()()()
Checks if current user is in the news editor role.
Public method Static member IsNewsEditor(String)
Checks if the user with the specified username is in one of the news editor roles.
Public method Static member IsNewsPublisher()()()()
Checks if current user is in the news Publishers role.
Public method Static member IsNewsPublisher(String)
Checks if current user is in the news Publishers role.
Public method Static member 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.
Public method Static member IsPhotoGalleryAdmin
Checks if current user is in the photo gallery administrator role.
Public method Static member IsUserInRole(Guid)
Checks if the currently active user is a member of the role with ID passed as a parameter.
Public method Static member IsUserInRole(String)
Check if the currently active user is in role passed as a parameter.
Public method Static member IsUserInRole(String, Guid)
Checks if the currently active user is a member of the role with ID passed as a parameter.
Public method Static member IsUserInRole(String, String)
Check if the specified user is in role passed as a parameter.
Public method Static member 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.
Public method Static member IsUserInRoles(String)
Checks if the currently active user is in any of the roles passed in the input parameter.
Public method Static member IsUserInRoles(array<String>[]()[][])
Checks if the currently active user is in any of the roles passed in the input parameter.
Public method Static member 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.
Public method Static member RemoveRoleIdFromCache
Remove RoleId from cache.
Public method Static member SanitizeHtml(String)
Encodes and sanitizes "unsecured" text that may be prone to XSS attacks if the user is not in the admin role.
Public method Static member SanitizeHtml(String, Boolean)
Encodes and sanitizes "unsecured" text that may be prone to XSS attacks if the user is not in the admin role.
Public method Static member 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.
Public method Static member 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.
Public method Static member UserRoleIds()()()()
Gets all role ids for current user
Public method Static member UserRoleIds(Guid)
Gets all role ids for the specified user.
Public method Static member UserRoleIds(String)
Gets all role ids for specified user.

Properties

  Name Description
Public property Static member AllUsersRoleId
Gets the Id of the "All Users" role.
Public property Static member AllUsersRoleName
Gets the name of the "All Users" role.

See Also