NShape Reference
IsGranted Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape > ISecurityManager Interface >

NShape Reference
IsGranted Method

Previous pageReturn to chapter overviewNext page

Decides whether the required permission is granted.

 

NShape 1.0.x

Syntax

bool IsGranted(Permission permission);

bool IsGranted(Permission permission, char domainName);

bool IsGranted(Permission permission, Shape shape);

bool IsGranted(Permission permission, IEnumerable<Shape> shapes);

Description

Returns true, if the indicated permission is granted given the permission set.

If a domainName is given, the permission is checked for the specified domainName only.

If shapes are given, the permission is checked for the Shape.SecurityDomainName of each shape. If the indicated permission is not granted for at least one shape, false is returned. Returns false if the shape collection does not contain any shapes.

 

NShape 2.0

Syntax

bool IsGranted(Permission permission);

bool IsGranted(Permission permission, SecurityAccess access);

bool IsGranted(Permission permission, char domainName);

bool IsGranted(Permission permission, SecurityAccess access, char domainName);

bool IsGranted(Permission permission, ISecurityDomainObject securityDomainObject);

bool IsGranted(Permission permission, SecurityAccess access,
  ISecurityDomainObject securityDomainObject);

bool IsGranted<T>(Permission permission, IEnumerable<T> securityDomainObjects)
  where T : ISecurityDomainObject;

bool IsGranted<T>(Permission permission, SecurityAccess access,
  IEnumerable<T> securityDomainObjects) where T : ISecurityDomainObject;

Description

Returns true, if the indicated permission is granted given the permission set.

If SecurityAccess is not specified, the check will be performed against SecurityAccess.Modify.

Please note that domain dependent permissions may only be checked against a domain name and security independent permissions may not be checked against domain names.

See Also

Concepts: Security