/// <summary>
        /// 是否包含权限的限制
        /// </summary>
        /// <param name="mi"></param>
        /// <returns></returns>
        private static bool HasPermissionRestricts(MemberInfo mi)
        {
            RoleDescriptionAttribute       roleDesp       = AttributeHelper.GetCustomAttribute <RoleDescriptionAttribute>(mi);
            PermissionDescriptionAttribute permissionDesp = AttributeHelper.GetCustomAttribute <PermissionDescriptionAttribute>(mi);
            RoleGroupsAttribute            roleGroups     = AttributeHelper.GetCustomAttribute <RoleGroupsAttribute>(mi);

            return(roleDesp != null || permissionDesp != null || roleGroups != null);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="roleGroups"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static bool UserInRoleGroups(this RoleGroupsAttribute roleGroups, IUser user)
        {
            bool result = false;

            if (roleGroups != null && user != null)
            {
                result = RolesDefineConfig.GetConfig().IsCurrentUserInRoles(user, roleGroups.Parse().ToArray());
            }

            return(result);
        }