Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 554 Bytes

role-based-access-control.md

File metadata and controls

19 lines (15 loc) · 554 Bytes

Role Based Access Control

StartSharp allows you to grant/deny access to pages, services or other parts of your application based on user roles in addition to permission key based validation.

[ReadPermission("Role:Sales")]
public class SomeResource
{
}
if (Authorization.HasPermission("Role:Auditor"))
{
	// ...
}

This works on Role names you define in the Roles page. It is also possible to assign unique String Keys to roles and use these for access control instead of depending on role names directly.