Esempio n. 1
0
 public override void TaskComplete(Tasks.Base sender, ICommandReply reply)
 {
     Tasks.DownloadUser task = (Tasks.DownloadUser)sender;
     Session         = _sessionMgr.AuthenticateUser(_db, task.User, _password);
     IsAuthenticated = (Session != null);
     TriggerOnComplete(null, new Tuple <Security.Session, bool>(Session, IsAuthenticated));
 }
 public override void TaskComplete(Tasks.Base sender, ICommandReply reply)
 {
     Tasks.DownloadUser task = (Tasks.DownloadUser)sender;
     Session = _sessionMgr.AuthenticateUser(_db, task.User, _password);
     IsAuthenticated = (Session != null);
     TriggerOnComplete(null, new Tuple<Security.Session, bool>(Session, IsAuthenticated));
 }
Esempio n. 3
0
 public GetAllGroups(IDatabase db, Security.RequestingPartyType requestingPartyType,
     Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public GetGlobalPermissions(IDatabase db, Security.RequestingPartyType requestingPartyType,
                             Security.Session session, int sendTimeout, int receiveTimeout, int sendBufferSize,
                             int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
 public GetResourceUsageRightsTemplate(IDatabase db,
                                       Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                                       int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
 public GetResourceUsageRightsTemplate(IDatabase db,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public HeadAllVersionsOfResource(IDatabase db, Data.Resource resource,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _resource = resource;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
Esempio n. 8
0
 public ModifyGroup(IDatabase db, Security.Group group,
                    Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                    int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _group = group;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
Esempio n. 9
0
 public ModifyVersion(IDatabase db, Data.Version version,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _version = version;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public GetResourceReadOnly(IDatabase db, Data.ResourceId id,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _id = id;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public ModifyVersion(IDatabase db, Data.Version version,
                      Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                      int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _version             = version;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
Esempio n. 12
0
 public CreateUser(IDatabase db, Security.User user,
                   Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                   int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _user = user;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
 public HeadAllVersionsOfResource(IDatabase db, Data.Resource resource,
                                  Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                                  int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _resource            = resource;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
Esempio n. 14
0
 public CheckoutVersion(IDatabase db, Data.VersionId id,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _id = id;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public CheckoutResource(IDatabase db, Data.ResourceId id,
                         Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                         int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _id = id;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
Esempio n. 16
0
 public CreateUser(IDatabase db, Security.User user,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _user = user;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
Esempio n. 17
0
 public CreateGroup(IDatabase db, Security.Group group,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _group = group;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
 public CreateNewResource(IDatabase db, CreateResourceArgs args,
                          Security.RequestingPartyType requestingPartyType,
                          Security.Session session, int sendTimeout,
                          int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _args = args;
     _requestingPartyType = requestingPartyType;
     _session             = session;
 }
 public CreateNewResource(IDatabase db, CreateResourceArgs args,
     Security.RequestingPartyType requestingPartyType,
     Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _args = args;
     _requestingPartyType = requestingPartyType;
     _session = session;
 }
Esempio n. 20
0
 public Search(IDatabase db, SearchArgs args,
               Security.RequestingPartyType requestingPartyType,
               Security.Session session, int sendTimeout,
               int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session             = session;
     _args = args;
 }
Esempio n. 21
0
 public Search(IDatabase db, SearchArgs args,
     Security.RequestingPartyType requestingPartyType,
     Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _requestingPartyType = requestingPartyType;
     _session = session;
     _args = args;
 }
Esempio n. 22
0
 public DeleteResource(IDatabase db, Data.ResourceId id,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _id = id;
     _requestingPartyType = requestingPartyType;
     _session = session;
     _versions = new Dictionary<Data.VersionId, Data.Version>();
     _receivedCount = 0;
 }
 public RollbackResource(IDatabase db, Data.ResourceId resourceId, int rollbackDepth,
                         Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                         int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _resourceId          = resourceId;
     _rollbackDepth       = rollbackDepth;
     _requestingPartyType = requestingPartyType;
     _session             = session;
     _receivedCount       = 0;
 }
 public CheckResourcePermissions(IDatabase db, Data.Resource resource, Security.RequestingPartyType requestingPartyType,
     Security.Session session, Security.Authorization.ResourcePermissionType requiredPermissions,
     int sendTimeout, int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _db = db;
     _resource = resource;
     _rpt = requestingPartyType;
     _session = session;
     _requiredPermissions = requiredPermissions;
 }
 public CheckGlobalPermissions(IDatabase db, GlobalUsageRights gur, Security.RequestingPartyType requestingPartyType,
                               Security.Session session, Security.Authorization.GlobalPermissionType requiredPermissions,
                               int sendTimeout, int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _db                  = db;
     _gur                 = gur;
     _rpt                 = requestingPartyType;
     _session             = session;
     _requiredPermissions = requiredPermissions;
 }
 public CheckGlobalPermissions(IDatabase db, GlobalUsageRights gur, Security.RequestingPartyType requestingPartyType,
     Security.Session session, Security.Authorization.GlobalPermissionType requiredPermissions, 
     int sendTimeout, int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _db = db;
     _gur = gur;
     _rpt = requestingPartyType;
     _session = session;
     _requiredPermissions = requiredPermissions;
 }
 public CheckResourcePermissions(IDatabase db, Data.Resource resource, Security.RequestingPartyType requestingPartyType,
                                 Security.Session session, Security.Authorization.ResourcePermissionType requiredPermissions,
                                 int sendTimeout, int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _db                  = db;
     _resource            = resource;
     _rpt                 = requestingPartyType;
     _session             = session;
     _requiredPermissions = requiredPermissions;
 }
 public RollbackResource(IDatabase db, Data.ResourceId resourceId, int rollbackDepth,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _resourceId = resourceId;
     _rollbackDepth = rollbackDepth;
     _requestingPartyType = requestingPartyType;
     _session = session;
     _receivedCount = 0;
 }
 public DeleteResource(IDatabase db, Data.ResourceId id,
                       Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                       int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _id = id;
     _requestingPartyType = requestingPartyType;
     _session             = session;
     _versions            = new Dictionary <Data.VersionId, Data.Version>();
     _receivedCount       = 0;
 }
Esempio n. 30
0
 public CreateNewVersion(IDatabase db, CreateVersionArgs args,
                         Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
                         int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _args = args;
     _requestingPartyType = requestingPartyType;
     _session             = session;
     _version             = new Data.Version(_args.VersionId, _args.Metadata, _args.Content);
     _version.Md5         = _args.Md5;
     _version.Extension   = _args.Extension;
     _version.Created     = DateTime.Now;
     _version.Creator     = session.User.Username;
     _version.Modified    = _version.Created;
     _version.Modifier    = _version.Creator;
 }
 public CreateNewVersion(IDatabase db, CreateVersionArgs args,
     Security.RequestingPartyType requestingPartyType, Security.Session session, int sendTimeout,
     int receiveTimeout, int sendBufferSize, int receiveBufferSize)
     : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
 {
     _args = args;
     _requestingPartyType = requestingPartyType;
     _session = session;
     _version = new Data.Version(_args.VersionId, _args.Metadata, _args.Content);
     _version.Md5 = _args.Md5;
     _version.Extension = _args.Extension;
     _version.Created = DateTime.Now;
     _version.Creator = session.User.Username;
     _version.Modified = _version.Created;
     _version.Modifier = _version.Creator;
 }
        public ModifyGlobalPermissions(IDatabase db, List <Security.UsageRight> usageRights,
                                       Security.RequestingPartyType requestingPartyType,
                                       Security.Session session, int sendTimeout, int receiveTimeout, int sendBufferSize,
                                       int receiveBufferSize)
            : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
        {
            _usageRights         = usageRights;
            _requestingPartyType = requestingPartyType;
            _session             = session;

            for (int i = 0; i < _usageRights.Count; i++)
            {
                // Throw an exception in the event that a resource usage right is included.
                if (_usageRights[i].Permissions.Resource != null)
                {
                    throw new ArgumentException("Resource usage rights are not proper within the global usage rights.");
                }
            }
        }
        public ModifyResourceUsageRightsTemplate(IDatabase db, List<Security.UsageRight> usageRights,
            Security.RequestingPartyType requestingPartyType, 
            Security.Session session, int sendTimeout, int receiveTimeout, int sendBufferSize, 
            int receiveBufferSize)
            : base(db, sendTimeout, receiveTimeout, sendBufferSize, receiveBufferSize)
        {
            _usageRights = usageRights;
            _requestingPartyType = requestingPartyType;
            _session = session;

            for (int i = 0; i < _usageRights.Count; i++)
            {
                // Throw an exception in the event that a resource usage right is included.
                if (_usageRights[i].Permissions.Global != null)
                {
                    throw new ArgumentException("Global usage rights are not proper within the resource usage rights template.");
                }
            }
        }