private bool HasPagePermission(TabInfo tab, string permissionKey) { return((PortalSecurity.IsInRoles(tab.TabPermissions.ToString(permissionKey)) || PortalSecurity.IsInRoles(tab.TabPermissions.ToString(AdminPagePermissionKey))) && !PortalSecurity.IsDenied(tab.TabPermissions.ToString(permissionKey)) && !PortalSecurity.IsDenied(tab.TabPermissions.ToString(AdminPagePermissionKey))); }
private bool HasPagePermission(TabInfo tab, string permissionKey) { return((PortalSecurity.IsInRoles(tab.TabPermissions.ToString(permissionKey)) || PortalSecurity.IsInRoles(tab.TabPermissions.ToString(AdminPagePermissionKey))) && !PortalSecurity.IsDenied(tab.TabPermissions.ToString(permissionKey))); //Deny on Edit permission on page shouldn't take away any other explicitly Allowed //&&!PortalSecurity.IsDenied(tab.TabPermissions.ToString(AdminPagePermissionKey)); }
/// <summary> /// Returns a flag indicating whether the current user can browse the folder /// </summary> /// <param name="folder">The page</param> /// <returns>A flag indicating whether the user has permission</returns> public virtual bool CanBrowseFolder(FolderInfo folder) { if (folder == null) { return(false); } return((PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(BrowseFolderPermissionKey)) || PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(ViewFolderPermissionKey))) && !PortalSecurity.IsDenied(folder.FolderPermissions.ToString(BrowseFolderPermissionKey))); }
private bool HasFolderPermission(FolderInfo folder, string permissionKey) { if (folder == null) { return(false); } return((PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(permissionKey)) || PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(AdminFolderPermissionKey))) && !PortalSecurity.IsDenied(folder.FolderPermissions.ToString(permissionKey)) && !PortalSecurity.IsDenied(folder.FolderPermissions.ToString(AdminFolderPermissionKey))); }
private bool HasFolderPermission(FolderInfo folder, string permissionKey) { if (folder == null) { return(false); } return((PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(permissionKey)) || PortalSecurity.IsInRoles(folder.FolderPermissions.ToString(AdminFolderPermissionKey))) && !PortalSecurity.IsDenied(folder.FolderPermissions.ToString(permissionKey))); //Deny on Edit permission on folder shouldn't take away any other explicitly Allowed //&& !PortalSecurity.IsDenied(folder.FolderPermissions.ToString(AdminFolderPermissionKey)); }
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); }