示例#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);
        }
示例#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));
        }