Skip to content

Adds support for Controls to be accessible based on defined permissions via attached properties

License

Notifications You must be signed in to change notification settings

felix-exon/ControlPermissions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Permission Controls

Adds support for Controls to be accessible based on defined permissions.

Example:

App.xaml.cs

public partial class App : Application, IPermissionControlApplication
{
	public UserType GetUserType(string username)
	{
		//Query DB or sth.
		return UserType.SuperUser;
	}
}

MainWindow.xaml

<!--Button not accessible to SuperUser-->
<Button Content="Click Me"		
		permissions:ControlPermissions.AuthorizedTypes="Users, Operators"
		permissions:ControlPermissions.NoPermissionBehaviour="Disabled">
</Button>

User:

Operator:

SuperUser:

Administrator:

About

Adds support for Controls to be accessible based on defined permissions via attached properties

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages