Beispiel #1
0
        public void RoleMatrixUsersTest()
        {
            IRole role = GetTestRole();

            SOARole soaRole = SOARoleHelper.PrepareSOARole(role);

            SOARolePropertyRowUsersCollection rowsUsers = soaRole.Rows.GenerateRowsUsers();

            //输出每一行中的每一个人,也包括指定的列
            Output(rowsUsers);
        }
Beispiel #2
0
        public void OperatorBelongToRoleMatrixTest()
        {
            IRole role = GetTestRole();

            SOARole soaRole = SOARoleHelper.PrepareSOARole(role);

            IUser user = OguMechanismFactory.GetMechanism().GetObjects <IUser>(SearchOUIDType.LogOnName, "fanhy").First();

            List <string> roleIDs = SOARolePropertiesAdapter.Instance.OperatorBelongToRoleIDsDirectly(user.ID);

            foreach (string roleID in roleIDs)
            {
                SOARolePropertyRowCollection rows = SOARolePropertiesAdapter.Instance.GetByRoleID(roleID);

                Output(rows);
            }
        }