IImpersonationPolicy interface
namespace: Serenity.Extensions assembly: Serenity.Extensions
Decides whether a user can impersonate another one, see IImpersonationManager: a denial of any policy wins, else at least one must allow it, so nobody can impersonate unless a policy says so. The default one of Pro (DefaultImpersonationPolicy) allows the holders of a permission, and denies the super admins as targets; an application adds its own, e.g. one that lets a teacher impersonate the own students, with services.TryAddEnumerable(ServiceDescriptor.Singleton<IImpersonationPolicy, MyPolicy>()).
public interface IImpersonationPolicy
Members
| name | description |
|---|---|
| Check(…) | Decides whether the impersonator, the current user, can impersonate the target. |
See Also
- Source: IImpersonationPolicy.cs