Table of Contents

Class PermissionBundle

Namespace
Shift.Common
Assembly
Shift.Common.dll
public class PermissionBundle
Inheritance
PermissionBundle
Inherited Members
Extension Methods

Constructors

PermissionBundle()

public PermissionBundle()

Properties

Access

public List<string> Access { get; set; }

Property Value

List<string>

Resources

public List<string> Resources { get; set; }

Property Value

List<string>

Roles

public List<string> Roles { get; set; }

Property Value

List<string>

Methods

Add(Permission)

public void Add(Permission permission)

Parameters

permission Permission

Flatten()

Returns a list of discrete permissions.

public List<Permission> Flatten()

Returns

List<Permission>

Remarks

An individual permission is a list of access rules assigned to a specific role on a specific resource. A permission bundle represents a compressed aggregation, where a list of access rules is assigned to multiple roles on multiple resources. This is a useful shorthand for file-based configuration settings.

Note: If a bundle has no access rules explicitly defined, then Basic Allow is assumed by default. This allows simple configuration settings like "grant access to roles A and B on resources X and Y".