Table of Contents

Class RequireScopeAttribute

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Declares the scope required to call this method.

[AttributeUsage(AttributeTargets.Method)]
public class RequireScopeAttribute : Attribute
Inheritance
RequireScopeAttribute
Inherited Members

Remarks

The attribute enforces nothing by itself. ScopeProxy reads it, and only on an interface registered through AddTeamService or AddSystemService. On a service registered any other way it is documentation, and the check has to be written by hand.

Constructors

RequireScopeAttribute(string)

public RequireScopeAttribute(string scope)

Parameters

scope string

Properties

AllowSystemGrant

On a team service, also admits a caller holding this scope as a system grant, acting on the named team without being a member of it; defaults to false, and a system service rejects it at registration.

public bool AllowSystemGrant { get; init; }

Property Value

bool

Audit

Whether calls to this method are recorded in the audit log. Defaults to Default, which defers to the host's AuditOptions.DefaultAuditMode.

public AuditMode Audit { get; set; }

Property Value

AuditMode

Remarks

The audit decision sits beside the access decision because that is where a reviewer looks, and because one attribute can only give one answer — two attributes on a method could disagree about the same call with no way to tell which wins.

Scope

public string Scope { get; }

Property Value

string