Пример #1
0
        public bool isUserAdmin(Data d){
            string profile = d.GetUserProfile();
            JToken s = Globals.ThisAddIn.GetSettings().GetGeneralSetting("AdminMenu");
            if(s!=null){
                if(s.Type == JTokenType.Array){
                    foreach(string t in (JArray)s){
                        if (t == profile) return true;
                    }
                }
                if (s.Type == JTokenType.String)
                {
                        if (s.ToString() == profile) return true;                    
                }
            }

            // Default so that these profiles always get them
            if (profile == "System Administrator" || profile == "Axiom Admin") return true;
            
            return false;
        }