Beispiel #1
0
        public async Task <IHttpActionResult> Delete(Guid id)
        {
            var allowed = await userService.HasPermission(User.Identity.GetUserId(), PermissionType.Designer, null);

            if (!allowed)
            {
                return(BadRequest("User is not authorised to perform this action"));
            }

            await layoutService.DeleteAsync(id);

            return(Ok());
        }