Skip to content

Commit 105dc93

Browse files
author
OpenShift Bot
authoredFeb 23, 2017
Merge pull request #1295 from benjaminapetersen/bug-1426118-rolebinding
Merged by openshift-bot
2 parents a1e8edc + 07f75c4 commit 105dc93

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
 

‎app/scripts/controllers/membership.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,11 @@ angular
327327
addRoleTo:function(subjectName, subjectKind, role, subjectNamespace) {
328328
var subject = {
329329
name: subjectName,
330-
kind: subjectKind,
331-
namespace: subjectNamespace
330+
kind: subjectKind
332331
};
332+
if(subjectKind === 'ServiceAccount') {
333+
subject.namespace = subjectNamespace;
334+
}
333335
// TODO (bpeterse): future. Role/ClusterRole roleRef disambiguation
334336
// Edge case a user creates a local Role with same name as ClusterRole,
335337
// roleRef doesn't necessarily contain namespace. There may be a way to

‎dist/scripts/scripts.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -5669,9 +5669,10 @@ httpErr:a("getErrorDetails")(b)
56695669
addRoleTo:function(a, b, c, e) {
56705670
var f = {
56715671
name:a,
5672-
kind:b,
5673-
namespace:e
5674-
}, g = _.find(d.roleBindings, {
5672+
kind:b
5673+
};
5674+
"ServiceAccount" === b && (f.namespace = e);
5675+
var g = _.find(d.roleBindings, {
56755676
roleRef:{
56765677
name:c.metadata.name
56775678
}

0 commit comments

Comments
 (0)
Please sign in to comment.