Commit 98f55a64 authored by Leigh Stoller's avatar Leigh Stoller

Add HasActualPrivilege() to distinguish between * and the real priv.

parent 9257c82b
......@@ -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) = @_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment