IInvitationPolicy interface
namespace: Serenity.Extensions assembly: Serenity.Extensions
Decides whether a user can invite someone, with the roles of the invitation, see IInvitationManager: a denial of any policy wins, else at least one must allow it, so nobody can invite unless a policy says so. The default one of Pro (DefaultInvitationPolicy) allows the holders of a permission to invite with the roles whose permissions they could grant; an application adds its own, e.g. one that lets a teacher invite students into the students role, with services.TryAddEnumerable(ServiceDescriptor.Singleton<IInvitationPolicy, MyPolicy>()). The policies are asked again for each role when the invitation is accepted, as the inviter, and the roles that the inviter can no longer give are left out.
public interface IInvitationPolicy
Members
| name | description |
|---|---|
| Check(…) | Decides whether the inviter, the current user, can send the invitation. |
See Also
- Source: IInvitationPolicy.cs