@@ -364,18 +364,6 @@ internal static HashSet<int> GetRoleIdsFromRoleString(string roleString)
364364 return roleString . ToHashSetFromDelimitedString < int > ( ";" ) ;
365365 }
366366
367- [ Obsolete ( "Deprecated in Community Forums. Removed in 10.00.00. Not Used." ) ]
368- internal static HashSet < int > GetRoleIdsFromRoleIdArray ( string [ ] roles )
369- {
370- return roles . Select ( r => Convert . ToInt32 ( r ) ) . ToHashSet ( ) ;
371- }
372-
373- [ Obsolete ( "Deprecated in Community Forums. Removed in 10.00.00. Not Used." ) ]
374- internal static HashSet < int > GetRoleIdsFromRoleNameArray ( int portalId , string [ ] roles )
375- {
376- return GetRoleIdsFromRoleString ( GetPortalRoleIds ( portalId : portalId , roles : roles ) ) ;
377- }
378-
379367 public static bool HasAccess ( string authorizedRoles , string userRoles )
380368 {
381369 return ! string . IsNullOrEmpty ( authorizedRoles ) && ! string . IsNullOrEmpty ( userRoles ) && HasRequiredPerm ( authorizedRoleIds : GetRoleIdsFromRoleString ( authorizedRoles ) , userRoleIds : GetRoleIdsFromRoleString ( userRoles ) ) ;
@@ -464,10 +452,6 @@ internal static int GetRoleId(DotNetNuke.Entities.Portals.PortalSettings portalS
464452 return GetRoles ( portalSettings ) . Where ( r => r . RoleName . Equals ( roleName ) ) . Select ( r => r . RoleID ) . FirstOrDefault ( ) ;
465453 }
466454
467- [ Obsolete ( "Deprecated in Community Forums. Removed in 10.00.00. Use GetPortalRoleIds(int PortalId, delimitedString[] Roles)." ) ]
468- public static string GetRoleIds ( string [ ] roles , int portalId ) => GetPortalRoleIds ( portalId , roles ) ;
469-
470-
471455 internal static string GetPortalRoleIds ( int portalId , string [ ] roles )
472456 {
473457 string roleIds = ( string ) DataCache . SettingsCacheRetrieve ( - 1 , string . Format ( CacheKeys . RoleIDs , portalId ) ) ;
@@ -567,24 +551,6 @@ internal static HashSet<int> GetUsersRoleIds(DotNetNuke.Entities.Portals.PortalS
567551 return roleIds . Distinct ( ) . OrderBy ( r => r ) . ToHashSet ( ) ;
568552 }
569553
570- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
571- public static bool HasPerm ( string authorizedPermSet , int userId , int portalId ) => throw new NotImplementedException ( ) ;
572-
573- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
574- public static bool HasPerm ( string authorizedRoles , DotNetNuke . Entities . Users . UserInfo user ) => throw new NotImplementedException ( ) ;
575-
576- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
577- public static bool HasPerm ( string authorizedPermSet , string userPermSet ) => throw new NotImplementedException ( ) ;
578-
579- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
580- public static bool HasPerm ( DotNetNuke . Entities . Portals . PortalSettings portalSettings , string authorizedPermSet , DotNetNuke . Entities . Users . UserInfo user ) => throw new NotImplementedException ( ) ;
581-
582- [ Obsolete ( "Deprecated in Community Forums. Removed in 10.00.00. Not Used." ) ]
583- public static bool HasPerm ( string authorizedPermSet , int portalId , int moduleId , int userId ) => throw new NotImplementedException ( ) ;
584-
585- [ Obsolete ( "Deprecated in Community Forums. Removed in 10.00.00. Not Used." ) ]
586- public string GetPermSet ( int moduleId , int permissionsId , string requestedAccess ) => throw new NotImplementedException ( ) ;
587-
588554 internal static string GetPermSetForRequestedAccess ( int moduleId , int permissionsId , DotNetNuke . Modules . ActiveForums . SecureActions requestedAccess )
589555 {
590556 var permission = new DotNetNuke . Modules . ActiveForums . Controllers . PermissionController ( ) . GetById ( permissionsId , moduleId ) ;
@@ -653,12 +619,6 @@ internal static HashSet<int> GetRoleIdsForRequestedAccess(int moduleId, int perm
653619 return GetRoleIdsFromPermSet ( GetPermSetForRequestedAccess ( permission , requestedAccess ) ) ;
654620 }
655621
656- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
657- public string SavePermSet ( int moduleId , int permissionsId , string requestedAccess , string permSet )
658- {
659- return this . SavePermSet ( moduleId , permissionsId , ( DotNetNuke . Modules . ActiveForums . SecureActions ) Enum . Parse ( typeof ( DotNetNuke . Modules . ActiveForums . SecureActions ) , requestedAccess ) , permSet ) ;
660- }
661-
662622 public string SavePermSet ( int moduleId , int permissionsId , DotNetNuke . Modules . ActiveForums . SecureActions requestedAccess , string permSet )
663623 {
664624 var permission = this . GetById ( permissionsId , moduleId ) ;
@@ -671,12 +631,6 @@ public string SavePermSet(int moduleId, int permissionsId, DotNetNuke.Modules.Ac
671631 return GetPermSetForRequestedAccess ( permission , requestedAccess ) ;
672632 }
673633
674- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
675- public static void AddObjectToPermissions ( int moduleId , int permissionsId , string requestedAccess , string objectId , int objectType )
676- {
677- AddObjectToPermissions ( moduleId , permissionsId , ( DotNetNuke . Modules . ActiveForums . SecureActions ) Enum . Parse ( typeof ( DotNetNuke . Modules . ActiveForums . SecureActions ) , requestedAccess ) , objectId ) ;
678- }
679-
680634 internal static void AddObjectToPermissions ( int moduleId , int permissionsId , DotNetNuke . Modules . ActiveForums . SecureActions requestedAccess , string objectId )
681635 {
682636 var pc = new DotNetNuke . Modules . ActiveForums . Controllers . PermissionController ( ) ;
@@ -693,18 +647,6 @@ internal static DotNetNuke.Modules.ActiveForums.Entities.PermissionInfo AddObjec
693647 return permissionInfo ;
694648 }
695649
696- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
697- internal static DotNetNuke . Modules . ActiveForums . Entities . PermissionInfo AddObjectToPermSet ( DotNetNuke . Modules . ActiveForums . Entities . PermissionInfo permissionInfo , DotNetNuke . Modules . ActiveForums . SecureActions requestedAccess , string objectId , int objectType )
698- {
699- return AddObjectToPermSet ( permissionInfo , requestedAccess , objectId ) ;
700- }
701-
702- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
703- public static void RemoveObjectFromPermissions ( int moduleId , int permissionsId , string requestedAccess , string objectId , int objectType )
704- {
705- RemoveObjectFromPermissions ( moduleId , permissionsId , ( DotNetNuke . Modules . ActiveForums . SecureActions ) Enum . Parse ( typeof ( DotNetNuke . Modules . ActiveForums . SecureActions ) , requestedAccess ) , objectId ) ;
706- }
707-
708650 internal static void RemoveObjectFromPermissions ( int moduleId , int permissionsId , DotNetNuke . Modules . ActiveForums . SecureActions requestedAccess , string objectId )
709651 {
710652 var pc = new DotNetNuke . Modules . ActiveForums . Controllers . PermissionController ( ) ;
@@ -724,37 +666,6 @@ internal static HashSet<int> RemoveRoleIdFromRoleIds(int roleId, HashSet<int> ro
724666 return roleIds ;
725667 }
726668
727- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
728- public static string RemovePermFromSet ( string objectId , int objectType , string permissionSet )
729- {
730- return RemovePermFromSet ( objectId , permissionSet ) ;
731- }
732-
733- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
734- internal static string SortPermissionSetMembers ( string permissionSet )
735- {
736- if ( string . IsNullOrEmpty ( permissionSet ) )
737- {
738- return string . Empty ;
739- }
740-
741- var permSet = permissionSet ;
742- var members = permSet . ToHashSetFromDelimitedString < int > ( ";" ) . OrderBy ( r => r ) ;
743- permSet = string . Join ( ";" , members ) ;
744- if ( ! string . IsNullOrEmpty ( permSet ) )
745- {
746- permSet += ";" ;
747- }
748-
749- return permSet ;
750- }
751-
752- [ Obsolete ( "Deprecated in Community Forums. Removing in 10.00.00. Not Used." ) ]
753- public static string AddPermToSet ( string objectId , int objectType , string permissionSet )
754- {
755- return AddPermToSet ( objectId , permissionSet ) ;
756- }
757-
758669 internal static string AddPermToSet ( string objectId , string permissionSet )
759670 {
760671 return GetRoleIds ( AddRoleIdToRoleIds ( Convert . ToInt32 ( objectId ) , GetRoleIdsFromPermSet ( permissionSet ) ) ) ;
0 commit comments