public string GetTabPermissionsByTabID(ArrayList arrTabPermissions, int TabID, string PermissionKey) { //Create a Tab Permission Collection from the ArrayList TabPermissionCollection tabPermissions = new TabPermissionCollection(arrTabPermissions, TabID); //Return the permission string for permissions with specified TabId return(tabPermissions.ToString(PermissionKey)); }
private bool IsDeniedTabPermission(TabPermissionCollection tabPermissions, string permissionKey) { bool isDenied = Null.NullBoolean; if (permissionKey.Contains(",")) { foreach (string permission in permissionKey.Split(',')) { if (PortalSecurity.IsDenied(tabPermissions.ToString(permission))) { isDenied = true; break; } } } else { isDenied = PortalSecurity.IsDenied(tabPermissions.ToString(permissionKey)); } return(isDenied); }
/// ----------------------------------------------------------------------------- /// <summary> /// HasTabPermission checks whether the current user has a specific Tab Permission /// </summary> /// <param name="tabPermissions">The Permissions for the Tab</param> /// <param name="permissionKey">The Permission to check</param> /// ----------------------------------------------------------------------------- public virtual bool HasTabPermission(TabPermissionCollection tabPermissions, string permissionKey) { bool hasPermission = PortalSecurity.IsInRoles(tabPermissions.ToString("EDIT")); if (!hasPermission) { if (permissionKey.Contains(",")) { foreach (string permission in permissionKey.Split(',')) { if (PortalSecurity.IsInRoles(tabPermissions.ToString(permission))) { hasPermission = true; break; } } } else { hasPermission = PortalSecurity.IsInRoles(tabPermissions.ToString(permissionKey)); } } return(hasPermission); }
public string GetTabPermissionsByTabID(ArrayList arrTabPermissions, int TabID, string PermissionKey) { //Create a Tab Permission Collection from the ArrayList TabPermissionCollection tabPermissions = new TabPermissionCollection(arrTabPermissions, TabID); //Return the permission string for permissions with specified TabId return tabPermissions.ToString(PermissionKey); }
public string GetTabPermissions(TabPermissionCollection tabPermissions, string permissionKey) { return tabPermissions.ToString(permissionKey); }
public string GetTabPermissions(TabPermissionCollection tabPermissions, string permissionKey) { return(tabPermissions.ToString(permissionKey)); }
public virtual bool IsTabPublic(TabPermissionCollection objTabPermissions) { string roles = objTabPermissions.ToString("VIEW"); bool hasPublicRole = false; if ((roles != null)) { // permissions strings are encoded with Deny permissions at the beginning and Grant permissions at the end for optimal performance foreach (string role in roles.Split(new[] { ';' })) { if (!string.IsNullOrEmpty(role)) { // Deny permission if (role.StartsWith("!")) { string denyRole = role.Replace("!", ""); if ((denyRole == Globals.glbRoleUnauthUserName || denyRole == Globals.glbRoleAllUsersName)) { hasPublicRole = false; break; } // Grant permission } else { if ((role == Globals.glbRoleUnauthUserName || role == Globals.glbRoleAllUsersName)) { hasPublicRole = true; break; } } } } } return hasPublicRole; }
private bool IsDeniedTabPermission(TabPermissionCollection tabPermissions, string permissionKey) { bool isDenied = Null.NullBoolean; if (permissionKey.Contains(",")) { foreach (string permission in permissionKey.Split(',')) { if (PortalSecurity.IsDenied(tabPermissions.ToString(permission))) { isDenied = true; break; } } } else { isDenied = PortalSecurity.IsDenied(tabPermissions.ToString(permissionKey)); } return isDenied; }
/// ----------------------------------------------------------------------------- /// <summary> /// HasTabPermission checks whether the current user has a specific Tab Permission /// </summary> /// <param name="tabPermissions">The Permissions for the Tab</param> /// <param name="permissionKey">The Permission to check</param> /// ----------------------------------------------------------------------------- public virtual bool HasTabPermission(TabPermissionCollection tabPermissions, string permissionKey) { bool hasPermission = PortalSecurity.IsInRoles(tabPermissions.ToString("EDIT")); if (!hasPermission) { if (permissionKey.Contains(",")) { foreach (string permission in permissionKey.Split(',')) { if (PortalSecurity.IsInRoles(tabPermissions.ToString(permission))) { hasPermission = true; break; } } } else { hasPermission = PortalSecurity.IsInRoles(tabPermissions.ToString(permissionKey)); } } return hasPermission; }
/// ----------------------------------------------------------------------------- /// <summary> /// HasTabPermission checks whether the current user has a specific Tab Permission /// </summary> /// <param name="objTabPermissions">The Permissions for the Tab</param> /// <param name="permissionKey">The Permission to check</param> /// <history> /// [cnurse] 04/15/2009 Created /// </history> /// ----------------------------------------------------------------------------- public virtual bool HasTabPermission(TabPermissionCollection objTabPermissions, string permissionKey) { return(PortalSecurity.IsInRoles(objTabPermissions.ToString(permissionKey))); }
/// ----------------------------------------------------------------------------- /// <summary> /// HasTabPermission checks whether the current user has a specific Tab Permission /// </summary> /// <param name="tabPermissions">The Permissions for the Tab</param> /// <param name="permissionKey">The Permission to check</param> /// <history> /// [cnurse] 04/15/2009 Created /// </history> /// ----------------------------------------------------------------------------- public virtual bool HasTabPermission(TabPermissionCollection tabPermissions, string permissionKey) { return PortalSecurity.IsInRoles(tabPermissions.ToString(permissionKey)); }