Skip to content
Snippets Groups Projects
Commit 068854f8 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Small fix (coscine/issues#1035)

parent ac480532
Branches
Tags
1 merge request!99Fix: Fixed HasAccessMethod
......@@ -178,7 +178,7 @@ namespace Coscine.Database.Models
var projectId = new ProjectResourceModel().GetProjectForResource(resource.Id);
IEnumerable<string> allowedAccessLabels = allowedAccess.Select(x => x.ToLower().Trim()).ToList();
return DatabaseConnection.ConnectToDatabase((db) => (from relation in db.ProjectRoles
where relation.ProjectId != projectId
where relation.ProjectId == projectId
&& relation.User.Id == user.Id
&& allowedAccessLabels.Contains(relation.Role.DisplayName.ToLower())
select relation).Any());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment