public bool CheckPermissionForUser(int userId, AccessFunctions permission) { var usuario = _context.Set <Usuario>().Include(x => x.Rol).FirstOrDefault(x => x.Id == userId); return(usuario.Rol.Permisos.Contains(((int)permission).ToString())); }
public PermissionRequirement(AccessFunctions permission) { Permission = permission; }
public bool HasPermisos(AccessFunctions accessFunction) { return(AccountPermisos.Contains(((int)accessFunction).ToString())); }