Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Java-于龙
origin-web-common
Commits
88985abe
Commit
88985abe
authored
Feb 20, 2018
by
Samuel Padgett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always return false in canI checks where resource is not set
parent
029f74c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
0 deletions
+19
-0
origin-web-common-services.js
dist/origin-web-common-services.js
+6
-0
origin-web-common.js
dist/origin-web-common.js
+6
-0
origin-web-common.min.js
dist/origin-web-common.min.js
+1
-0
authorizationService.js
src/services/authorizationService.js
+6
-0
No files found.
dist/origin-web-common-services.js
View file @
88985abe
...
...
@@ -1100,6 +1100,12 @@ angular.module("openshiftCommonServices")
return
true
;
}
// Explicitly check for falsey resources so we don't return true when the
// group has a wildcard. If resource is falsey, return false always.
if
(
!
resource
)
{
return
false
;
}
// normalize to structured form
var
r
=
APIService
.
toResourceGroupVersion
(
resource
);
var
rules
=
getRulesForProject
(
projectName
||
currentProject
);
...
...
dist/origin-web-common.js
View file @
88985abe
...
...
@@ -3166,6 +3166,12 @@ angular.module("openshiftCommonServices")
return
true
;
}
// Explicitly check for falsey resources so we don't return true when the
// group has a wildcard. If resource is falsey, return false always.
if
(
!
resource
)
{
return
false
;
}
// normalize to structured form
var
r
=
APIService
.
toResourceGroupVersion
(
resource
);
var
rules
=
getRulesForProject
(
projectName
||
currentProject
);
...
...
dist/origin-web-common.min.js
View file @
88985abe
...
...
@@ -1416,6 +1416,7 @@ return l.promise;
},
canI
:
function
(
e
,
t
,
n
)
{
if
(
c
)
return
!
0
;
if
(
!
e
)
return
!
1
;
var
r
=
o
.
toResourceGroupVersion
(
e
),
i
=
g
(
n
||
a
);
return
!!
i
&&
(
h
(
i
,
t
,
r
.
group
,
r
.
resource
)
||
h
(
i
,
t
,
"*"
,
"*"
)
||
h
(
i
,
t
,
r
.
group
,
"*"
)
||
h
(
i
,
t
,
"*"
,
r
.
resource
));
},
...
...
src/services/authorizationService.js
View file @
88985abe
...
...
@@ -141,6 +141,12 @@ angular.module("openshiftCommonServices")
return
true
;
}
// Explicitly check for falsey resources so we don't return true when the
// group has a wildcard. If resource is falsey, return false always.
if
(
!
resource
)
{
return
false
;
}
// normalize to structured form
var
r
=
APIService
.
toResourceGroupVersion
(
resource
);
var
rules
=
getRulesForProject
(
projectName
||
currentProject
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment