public RolePermissionListResponse List(IDbConnection connection, RolePermissionListRequest request)
        {
            Check.NotNull(request, "request");
            Check.NotNull(request.RoleID, "roleID");

            string prefix = "";
            string module = request.Module.TrimToEmpty();
            string submodule = request.Submodule.TrimToEmpty();

            if (module.Length > 0)
                prefix = module;

            if (submodule.Length > 0)
                prefix += ":" + submodule;

            var response = new RolePermissionListResponse();

            response.Entities = GetExisting(connection, request.RoleID.Value, request.Module, request.Submodule)
                .Select(x => x.PermissionKey).ToList();

            return response;
        }
예제 #2
0
 public RolePermissionListResponse List(IDbConnection connection, RolePermissionListRequest request)
 {
     return new MyRepository().List(connection, request);
 }
예제 #3
0
 public RolePermissionListResponse List(IDbConnection connection, RolePermissionListRequest request)
 {
     return(new MyRepository().List(connection, request));
 }