コード例 #1
0
 public dtoRoleAssignment(VersionRolePermission rp, Dictionary <Int32, String> translations)
     : base(rp)
 {
     this.Type   = PermissionType.Role;
     DisplayName = (translations.ContainsKey(IdRole)) ? translations[IdRole] : IdRole.ToString();
     IdCommunity = (rp.Community == null) ? 0 : rp.Community.Id;
     IdRole      = (rp.AssignedTo == null) ? 0 : rp.AssignedTo.Id;
 }
コード例 #2
0
        public virtual VersionRolePermission Copy(TemplateDefinition template, TemplateDefinitionVersion version, litePerson person, String ipAddrees, String ipProxyAddress)
        {
            VersionRolePermission n = new VersionRolePermission();

            n.CreateMetaInfo(person, ipAddrees, ipProxyAddress);
            n.Version          = version;
            n.Clone            = Clone;
            n.Edit             = Edit;
            n.ChangePermission = ChangePermission;
            n.Type             = Type;
            n.Template         = template;
            n.ToApply          = ToApply;
            n.AssignedTo       = AssignedTo;
            n.Community        = Community;
            return(n);
        }
コード例 #3
0
 public dtoRoleAssignment(VersionRolePermission rp) : base(rp)
 {
     this.Type = PermissionType.Role;
 }