Ejemplo n.º 1
0
        public override async Task GetPermissions(UserPermissionRequest user, IServerStreamWriter <UserPermissionReplay> responseStream, ServerCallContext context)
        {
            var permissions = await _permissionsService.GetByUserIdAsync(user.Id);

            foreach (var permission in permissions)
            {
                await responseStream.WriteAsync(new UserPermissionReplay
                {
                    Permission = (int)permission.UserPermission
                });
            }
        }