Created
June 4, 2010 13:45
-
-
Save jfromaniello/425427 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace GenWise.Security.Service | |
{ | |
public interface ISecurityService | |
{ | |
/// <summary> | |
/// Create a new operation. | |
/// | |
/// Operation Id could be in the form of: | |
/// /Module/UseCase/Action | |
/// | |
/// /Module/UseCase | |
/// | |
/// just /Module | |
/// | |
/// and it support any nesting level. | |
/// </summary> | |
/// <param name="operationId"></param> | |
void SaveOperation(string operationId); | |
/// <summary> | |
/// Create an user group with a given user group identifier. | |
/// </summary> | |
/// <param name="userGroupId"></param> | |
void CreateGroup(string userGroupId); | |
/// <summary> | |
/// Returns true if the user group is allowed to do a given operation. | |
/// This means the the user is allowe for the given operation, or a parent | |
/// operation without having a forbid operation in the way to the top parent. | |
/// </summary> | |
/// <param name="operationId"></param> | |
/// <param name="userGroupId"></param> | |
/// <returns></returns> | |
bool IsAllowed(string operationId, string userGroupId); | |
/// <summary> | |
/// Grant rights to an user group for an operation | |
/// </summary> | |
/// <param name="operationId"></param> | |
/// <param name="userGroupId"></param> | |
void GrantUserGroupRights(string operationId, string userGroupId); | |
/// <summary> | |
/// Forbid operation to an user group | |
/// </summary> | |
/// <param name="operationId"></param> | |
/// <param name="userGroupId"></param> | |
void ForbidOperation(string operationId, string userGroupId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment