예제 #1
0
파일: User.cs 프로젝트: pgovind/runtime
        //
        // Private implementation
        //

        private ResultSet GetAuthorizationGroupsHelper()
        {
            // Make sure we're not disposed or deleted.
            CheckDisposedOrDeleted();

            // Unpersisted principals are not members of any group
            if (this.unpersisted)
            {
                GlobalDebug.WriteLineIf(GlobalDebug.Info, "User", "GetAuthorizationGroupsHelper: unpersisted, using EmptySet");
                return(new EmptySet());
            }

            StoreCtx storeCtx = GetStoreCtxToUse();

            Debug.Assert(storeCtx != null);

            GlobalDebug.WriteLineIf(
                GlobalDebug.Info,
                "User",
                "GetAuthorizationGroupsHelper: retrieving AZ groups from StoreCtx of type=" + storeCtx.GetType().ToString() +
                ", base path=" + storeCtx.BasePath);

            ResultSet resultSet = storeCtx.GetGroupsMemberOfAZ(this);

            return(resultSet);
        }
예제 #2
0
 private ResultSet GetAuthorizationGroupsHelper()
 {
     base.CheckDisposedOrDeleted();
     if (!this.unpersisted)
     {
         StoreCtx  storeCtxToUse    = base.GetStoreCtxToUse();
         ResultSet groupsMemberOfAZ = storeCtxToUse.GetGroupsMemberOfAZ(this);
         return(groupsMemberOfAZ);
     }
     else
     {
         return(new EmptySet());
     }
 }