C# 클래스 Serenity.Authorization

Provides a common access point for authorization related services
파일 보기 프로젝트 열기: volkanceylan/Serenity

공개 메소드들

메소드 설명
HasPermission ( string permission ) : bool

Returns true if current user has given permission.

ValidateLoggedIn ( ) : void

Checks if there is a currently logged user and throws a validation error with "NotLoggedIn" error code if not.

ValidatePermission ( string permission ) : void

Checks if current user has given permission and throws a validation error with "AccessDenied" error code if not.

메소드 상세

HasPermission() 공개 정적인 메소드

Returns true if current user has given permission.
public static HasPermission ( string permission ) : bool
permission string Permission key (e.g. Administration)
리턴 bool

ValidateLoggedIn() 공개 정적인 메소드

Checks if there is a currently logged user and throws a validation error with "NotLoggedIn" error code if not.
public static ValidateLoggedIn ( ) : void
리턴 void

ValidatePermission() 공개 정적인 메소드

Checks if current user has given permission and throws a validation error with "AccessDenied" error code if not.
public static ValidatePermission ( string permission ) : void
permission string
리턴 void