Closed kidandcat closed 7 years ago
Ok, got it:
$createAccountRight = new RightModifierInfo ( 'createAccount' );
$grantee = new GranteeSelector ();
$granteeType = new GranteeType ();
$granteeType->value ( 'testuser' );
$grantee->setBy ( $granteeType );
$type = new TargetType ( 'domain' );
$targetby = new TargetBy ( 'name' );
$targetby->value ( 'zimbra-1.telcom' );
$target = new EffectiveRightsTargetSelector ( $type, $targetby );
$api->grantRight ( $target, $grantee, $createAccountRight );
Could I get an example of grantRight?, I can't see how to use it:
new TargetType does not have construct, so extended Base constructor is protected and it gives an error.