Exemple #1
0
        public object GetRolePers(string organzitionId)
        {
            var roles       = _organizationUnitManager.GetRoleTree(organzitionId);
            var permissions = _organizationUnitManager.GetPermissionTree(organzitionId);
            var data        = new { roles, permissions };

            return(data);
        }
Exemple #2
0
        public object GetRolePers(string organzitionId)
        {
            List <IviewTree> roles       = new List <IviewTree>();
            List <IviewTree> permissions = new List <IviewTree>();

            if (IsGranted(PermissionNames.Pages_OrganizationUnits_SetRole))
            {
                roles = _organizationUnitManager.GetRoleTree(organzitionId);
            }
            if (IsGranted(PermissionNames.Pages_OrganizationUnits_SetPers))
            {
                permissions = _organizationUnitManager.GetPermissionTree(organzitionId);
            }


            var data = new { roles, permissions };

            return(data);
        }