示例#1
0
 public RbacColumn(string name, RbacDataTypes dataType,
                   bool create = false, bool read = false, bool update = false)
 {
     this.Name     = name;
     this.DataType = dataType;
     //this.IsFilterColumn = isFilterColumn;
     this.AllowedOperations = Rbac.ParseOperations(create, read, update, false);
 }
示例#2
0
 public RbacTable(string objectId, string name,
                  string create = "False", string read = "False", string update = "False", string delete = "False")
 {
     this.ObjectId          = objectId;
     this.Name              = name;
     this.Columns           = new List <RbacColumn>();
     this.Conditions        = new List <RbacCondition>();
     this.Relations         = new List <RbacRelation>();
     this.Parameters        = new List <RbacParameter>();
     this.AllowedOperations = Rbac.ParseOperations(create, read, update, delete);
 }
示例#3
0
 public RbacColumn(string name, string dataType, string create = "False", string read = "False", string update = "False")
 {
     switch (dataType)
     {
     case "numeric":
         dataType = "Decimal";
         break;
     }
     this.Name              = name;
     this.DataType          = (RbacDataTypes)Enum.Parse(typeof(RbacDataTypes), dataType, true);
     this.AllowedOperations = Rbac.ParseOperations(create, read, update, "False");
 }