Exemple #1
0
        private Guid FindOwnerUserId(Guid contactId)
        {
            var sysAdminUnit = new SysAdminUnit(UserConnection);
            var conditions   = new Dictionary <string, object> {
                { "Contact", contactId }
            };

            if (sysAdminUnit.FetchFromDB(conditions))
            {
                return(sysAdminUnit.Id);
            }
            return(Guid.Empty);
        }
Exemple #2
0
        private bool CanReceiverReadConnectedEntity(Reminding reminding, string schemaName)
        {
            var sysAdminUnit = new SysAdminUnit(UserConnection);

            if (!sysAdminUnit.FetchFromDB("Contact", reminding.ContactId, false))
            {
                return(false);
            }
            var rightsLevel = UserConnection.DBSecurityEngine.GetEntitySchemaRecordRightLevel(sysAdminUnit.Id,
                                                                                              schemaName, reminding.SubjectId);

            return(rightsLevel.HasFlag(SchemaRecordRightLevels.CanRead));
        }
 public SysAdminUnit(SysAdminUnit source)
     : base(source)
 {
 }
 public SysAdminUnit(Terrasoft.Configuration.SysAdminUnit source)
     : base(source)
 {
     this.CopyEntityLookupProperties(source);
 }