Skip to content

Commit

Permalink
#1592 Fix user visibility for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 13, 2020
1 parent 11e5067 commit 382d717
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@
'_name': 'users'
}
],
config: {
headers: {
'X-Organisation': self.org.name
}
},
onFailure: function(err) {
if(err && err.status === 400) {
self.filtering.resetContext();
Expand Down
6 changes: 1 addition & 5 deletions frontend/app/scripts/services/api/OrganisationSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@
{
'_name': 'users'
}
], {
headers: {
'X-Organisation': orgId
}
}).then(function(response) {
]).then(function(response) {
return $q.resolve(response.data);
});
};
Expand Down
3 changes: 2 additions & 1 deletion thehive/app/org/thp/thehive/services/OrganisationSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ object OrganisationOps {
def dashboards: Traversal.V[Dashboard] = traversal.out[OrganisationDashboard].v[Dashboard]

def visible(implicit authContext: AuthContext): Traversal.V[Organisation] =
if (authContext.isPermitted(Permissions.manageOrganisation)) traversal
if (authContext.isPermitted(Permissions.manageOrganisation))
traversal
else
traversal.filter(_.visibleOrganisationsTo.users.current)

Expand Down

0 comments on commit 382d717

Please sign in to comment.