Exemplo n.º 1
0
        public async Task <int> GetPermissionByIdAsync(string id)
        {
            OrgUserServiceDevReference.OrgUserServiceClient orgUserServiceClient = new OrgUserServiceDevReference.OrgUserServiceClient();
            var permissionList = await orgUserServiceClient.GetPermissionListAsync();

            return(permissionList.Where(x => x.PermissionID == id).Select(i => i.PermissionKey).Single());
        }
Exemplo n.º 2
0
        public async Task <IEnumerable <OrgUserServiceDevReference.Permission> > GetPermissionListAsync()
        {
            OrgUserServiceDevReference.OrgUserServiceClient orgUserServiceClient = new OrgUserServiceDevReference.OrgUserServiceClient();
            var permissionList = await orgUserServiceClient.GetPermissionListAsync();

            //IEnumerable<OrgUserServiceDevReference.PermissionProfile> permissionProfilesResult = permissionProfiles.Cast<OrgUserServiceDevReference.PermissionProfile>();
            return(permissionList.Where(x => x.PermissionKey != 1));
        }