Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
98f55a64
Commit
98f55a64
authored
Oct 28, 2014
by
Leigh B Stoller
Browse files
Add HasActualPrivilege() to distinguish between * and the real priv.
parent
9257c82b
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCredential.pm.in
View file @
98f55a64
...
...
@@ -45,7 +45,7 @@ use GeniResponse;
use
GeniUtil
;
use
GeniXML
;
use
GeniHRN
;
use
emutil
qw
(
TBGetUniqueIndex
)
;
use
emutil
;
use
English
;
use
XML
::
Simple
;
use
XML
::
LibXML
;
...
...
@@ -1024,6 +1024,16 @@ sub HasPrivilege($$)
return
defined
(
$
self
->{
'capabilities'
}->{
$
p
}
);
}
sub
HasActualPrivilege
($$)
{
my
($
self
,
$
p
)
=
@
_
;
return
0
if
(
!exists($self->{'capabilities'}));
return
exists
($
self
->{
'capabilities'
}->{$
p
})
?
1
:
0
;
}
sub
CheckCredential
($;$$)
{
my
($
credential
,
$
target
,
$
nocheck
)
=
@
_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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