Пример #1
0
        public async Task <bool> AccessEditor(string userId, string groupId)
        {
            var             accessToken     = Session["MicrosoftAccessToken"] as string;
            RoleTypeService roleTypeService = new RoleTypeService(accessToken);

            return(await roleTypeService.CanUserEditItem(userId, groupId));
        }
Пример #2
0
        public async Task <bool> AccessEditor(string groupId)
        {
            var accessToken = Session["MicrosoftAccessToken"] as string;

            UserService userService = new UserService(accessToken);
            string      userId      = await userService.GetUserInternalId(Session["UserId"] as string, UserDomainEnum.Microsoft);

            RoleTypeService roleTypeService = new RoleTypeService(accessToken);

            return(await roleTypeService.CanUserEditItem(userId, groupId));
        }