Beispiel #1
0
 public bool AuthDeleteSRequest(AuthZAttribute authz, string creatorName)
 {
     if (authz.SRequestAuthZ[3] == false)
     {
         return(creatorName.Equals(authz.DisplayName));
     }
     return(authz.SRequestAuthZ[3]);
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="displayName"></param>
        /// <param name="adminAuthZ"></param>
        /// <returns></returns>
        public AuthZAttribute CreateUserAuthZ(string displayName, bool[] adminAuthZ)
        {
            bool enabledAuthZ = true;

            bool[] accountAuthZ = new bool[3] {
                true, true, true
            };
            bool searchHouseholdAuthZ = true;

            bool[] messageAuthZ = new bool[5] {
                true, true, true, true, true
            };
            bool[] inviteAuthZ = new bool[4] {
                false, true, true, true
            };
            bool[] householdAuthZ = new bool[4] {
                true, true, false, false
            };
            bool[] tenantAuthZ = new bool[5] {
                false, false, false, false, false
            };
            bool[] expenseAuthZ = new bool[4] {
                false, false, false, false
            };
            bool[] taskAuthZ = new bool[4] {
                false, false, false, false
            };
            bool[] sRequestAuthZ = new bool[4] {
                false, false, false, false
            };

            //TODO: redo design document to reflect new parameters needed.
            AuthZAttribute authZ = new AuthZAttribute(displayName, 0, enabledAuthZ, adminAuthZ,
                                                      accountAuthZ, searchHouseholdAuthZ, messageAuthZ, inviteAuthZ, householdAuthZ, tenantAuthZ, expenseAuthZ, taskAuthZ, sRequestAuthZ);

            return(authZ);
        }
Beispiel #3
0
        public AuthZAttribute CreateCoHostAuthZ(string displayName, int householdID, bool[] adminAuthZ)
        {
            bool enabledAuthZ = true;

            bool[] accountAuthZ = new bool[3] {
                true, true, true
            };
            bool searchHouseholdAuthZ = true;

            bool[] messageAuthZ = new bool[5] {
                false, true, true, true, true
            };
            bool[] inviteAuthZ = new bool[4] {
                true, true, false, true
            };
            bool[] householdAuthZ = new bool[4] {
                false, true, false, false
            };
            bool[] tenantAuthZ = new bool[5] {
                true, false, false, false, true
            };
            bool[] expenseAuthZ = new bool[4] {
                true, true, true, true
            };
            bool[] taskAuthZ = new bool[4] {
                true, true, true, true
            };
            bool[] sRequestAuthZ = new bool[4] {
                true, true, true, true
            };

            AuthZAttribute authZ = new AuthZAttribute(displayName, householdID, enabledAuthZ, adminAuthZ,
                                                      accountAuthZ, searchHouseholdAuthZ, messageAuthZ, inviteAuthZ, householdAuthZ, tenantAuthZ, expenseAuthZ, taskAuthZ, sRequestAuthZ);

            return(authZ);
        }
Beispiel #4
0
 public bool AuthSendMessage(AuthZAttribute authz)
 {
     return(authz.MessageAuthZ[0]);
 }
Beispiel #5
0
 public bool AuthSearchHousehold(AuthZAttribute authz)
 {
     return(authz.SearchHouseholdAuthZ);
 }
Beispiel #6
0
 public bool AuthEditExpense(AuthZAttribute authz)
 {
     return(authz.ExpenseAuthZ[2]);
 }
Beispiel #7
0
 public bool AuthViewHousehold(AuthZAttribute authz)
 {
     return(authz.HouseholdAuthZ[1]);
 }
Beispiel #8
0
 public bool AuthMarkMessage(AuthZAttribute authz)
 {
     return(authz.MessageAuthZ[3]);
 }
Beispiel #9
0
 public bool AuthSendInvite(AuthZAttribute authz)
 {
     return(authz.InviteAuthZ[0]);
 }
Beispiel #10
0
 public bool AuthCreateSRequest(AuthZAttribute authz)
 {
     return(authz.SRequestAuthZ[0]);
 }
Beispiel #11
0
 public bool AuthViewSRequest(AuthZAttribute authz)
 {
     return(authz.SRequestAuthZ[1]);
 }
Beispiel #12
0
 public bool AuthEditTask(AuthZAttribute authz)
 {
     return(authz.TaskAuthZ[2]);
 }
Beispiel #13
0
 public bool AuthDeleteTask(AuthZAttribute authz)
 {
     return(authz.TaskAuthZ[3]);
 }
Beispiel #14
0
 public bool AuthViewTask(AuthZAttribute authz)
 {
     return(authz.TaskAuthZ[1]);
 }
Beispiel #15
0
 public bool AuthCreateTask(AuthZAttribute authz)
 {
     return(authz.TaskAuthZ[0]);
 }
Beispiel #16
0
 public bool AuthDeleteExpense(AuthZAttribute authz)
 {
     return(authz.ExpenseAuthZ[3]);
 }
Beispiel #17
0
 public bool AuthReplyMessage(AuthZAttribute authz)
 {
     return(authz.MessageAuthZ[1]);
 }
Beispiel #18
0
 public bool AuthEnableAccount(AuthZAttribute authz)
 {
     return(authz.AdminAuthZ[1]);
 }
Beispiel #19
0
 public bool AuthViewMessage(AuthZAttribute authz)
 {
     return(authz.MessageAuthZ[2]);
 }
Beispiel #20
0
 public bool AuthAcceptInvite(AuthZAttribute authz)
 {
     return(authz.InviteAuthZ[2]);
 }
Beispiel #21
0
 public bool AuthDeleteMessage(AuthZAttribute authz)
 {
     return(authz.MessageAuthZ[4]);
 }
Beispiel #22
0
 public bool AuthDeclineInvite(AuthZAttribute authz)
 {
     return(authz.InviteAuthZ[3]);
 }
Beispiel #23
0
 public bool AuthViewInvite(AuthZAttribute authz)
 {
     return(authz.InviteAuthZ[1]);
 }
Beispiel #24
0
 public bool AuthViewExpense(AuthZAttribute authz)
 {
     return(authz.ExpenseAuthZ[1]);
 }
Beispiel #25
0
 public bool AuthIsEnabled(AuthZAttribute authz)
 {
     return(authz.EnabledAuthZ);
 }
Beispiel #26
0
 public bool AuthEditProfile(AuthZAttribute authz)
 {
     return(authz.AccountAuthZ[0]);
 }
Beispiel #27
0
 public bool AuthCreateHousehold(AuthZAttribute authz)
 {
     return(authz.HouseholdAuthZ[0]);
 }
Beispiel #28
0
 public bool AuthViewProfile(AuthZAttribute authz)
 {
     return(authz.AccountAuthZ[1]);
 }
Beispiel #29
0
 public bool AuthEditHousehold(AuthZAttribute authz)
 {
     return(authz.HouseholdAuthZ[2]);
 }
Beispiel #30
0
 public bool AuthDeleteAccount(AuthZAttribute authz)
 {
     return(authz.AccountAuthZ[2]);
 }