Skip to content

Commit

Permalink
Always prepend the project ID when checking permissions and roles
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Aug 15, 2017
1 parent 428c890 commit b35b63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portcullis.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (r *ReqInfo) GlobalAppID() string {
// HasRole check if the user has a specific role
func (r *ReqInfo) HasRole(checkRole string) bool {
for _, role := range r.Roles {
if role == checkRole {
if role == r.ProjectID+"/"+checkRole {
return true
}
}
Expand All @@ -75,7 +75,7 @@ func (r *ReqInfo) HasRole(checkRole string) bool {
// HasPermission check if the user has a specific permission
func (r *ReqInfo) HasPermission(checkPermission string) bool {
for _, permission := range r.Permissions {
if permission == checkPermission {
if permission == r.ProjectID+"/"+checkPermission {
return true
}
}
Expand Down

0 comments on commit b35b63f

Please sign in to comment.