Skip to content

$Delegation.Add

Overview

String $Delegation.Add ( from, to, start, end )

Adds a new delegation specified "from" identity to specified "to" identity and returns the id number of delegation.

Arguments

Identiy | String from Specifies the source delegating identity.

Identity | String to Specifies the target delegated identity.

DateTimeOffset start Specifies the begin date of delegation.

DateTimeOffset end Specifies the end date of delegation.

Remarks

Examples

Create a new delegation;

var from = $Membership.FindIdentity('madonna','User');
var to = $Membership.FindIdentity('lady.gaga','User');

var id = $Delegation.Add( from, to, $Calendar.Today, $Calendar.Add($Calendar.Today, 8) );

See Also