Exemplo n.º 1
0
        /// <summary>
        /// 权限判断
        /// </summary>
        /// <param name="o">权限</param>
        /// <returns>是否有权限</returns>
        public bool IsHavePower(string o)
        {
            string[] permissions = o.Split(',');

            if (UserPermissions == null)
            {
                return(false);
            }

            foreach (var i in UserPermissions)
            {
                if (StringValidate.IsStringExists(i.ToString(), permissions))
                {
                    return(true);
                }
            }

            return(false);
        }