Skip to content

Fix bug 1426118, ignore namespace except for service account #1295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/scripts/controllers/membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,11 @@ angular
addRoleTo:function(subjectName, subjectKind, role, subjectNamespace) {
var subject = {
name: subjectName,
kind: subjectKind,
namespace: subjectNamespace
kind: subjectKind
};
if(subjectKind === 'ServiceAccount') {
subject.namespace = subjectNamespace;
}
// TODO (bpeterse): future. Role/ClusterRole roleRef disambiguation
// Edge case a user creates a local Role with same name as ClusterRole,
// roleRef doesn't necessarily contain namespace. There may be a way to
Expand Down
7 changes: 4 additions & 3 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5669,9 +5669,10 @@ httpErr:a("getErrorDetails")(b)
addRoleTo:function(a, b, c, e) {
var f = {
name:a,
kind:b,
namespace:e
}, g = _.find(d.roleBindings, {
kind:b
};
"ServiceAccount" === b && (f.namespace = e);
var g = _.find(d.roleBindings, {
roleRef:{
name:c.metadata.name
}
Expand Down