コード例 #1
0
ファイル: ItemPrivileges.cs プロジェクト: pkim/Hlib
        public static ItemPrivileges GetItemPrivileges(String _privileges)
        {
            ItemPrivileges itemPrivileges = new ItemPrivileges();

            itemPrivileges.USER_NAME = ItemPrivilege.GetItemPrivilege(_privileges.Substring(0, 3));
            itemPrivileges.Group     = ItemPrivilege.GetItemPrivilege(_privileges.Substring(3, 3));
            itemPrivileges.Others    = ItemPrivilege.GetItemPrivilege(_privileges.Substring(6, 3));

            return(itemPrivileges);
        }
コード例 #2
0
ファイル: ItemPrivilege.cs プロジェクト: pkim/Hlib
        public static ItemPrivilege GetItemPrivilege(String _privilege)
        {
            ItemPrivilege itemPrivilege = new ItemPrivilege();

            // Read Permission
            if (_privilege[(Int32)PrivilegeAttribute.Read] == ReadPermission)
                itemPrivilege.Read = true;
            else
                itemPrivilege.Read = false;

            // Write Permission
            if (_privilege[(Int32)PrivilegeAttribute.Write] == WritePermission)
                itemPrivilege.Write = true;
            else
                itemPrivilege.Write = false;

            // Execute Permission
            if (_privilege[(Int32)PrivilegeAttribute.Execute] == ReadPermission)
                itemPrivilege.Execute = true;
            else
                itemPrivilege.Execute = false;

            return itemPrivilege;
        }
コード例 #3
0
        public static ItemPrivilege GetItemPrivilege(String _privilege)
        {
            ItemPrivilege itemPrivilege = new ItemPrivilege();

            // Read Permission
            if (_privilege[(Int32)PrivilegeAttribute.Read] == ReadPermission)
            {
                itemPrivilege.Read = true;
            }
            else
            {
                itemPrivilege.Read = false;
            }

            // Write Permission
            if (_privilege[(Int32)PrivilegeAttribute.Write] == WritePermission)
            {
                itemPrivilege.Write = true;
            }
            else
            {
                itemPrivilege.Write = false;
            }

            // Execute Permission
            if (_privilege[(Int32)PrivilegeAttribute.Execute] == ReadPermission)
            {
                itemPrivilege.Execute = true;
            }
            else
            {
                itemPrivilege.Execute = false;
            }

            return(itemPrivilege);
        }