Beispiel #1
0
        public ActionResult <string> GetUserGroups(int id)
        {
            string result = "";

            if (Program.dataSet == null && Program.errorStatus != PasswdErrors.PasswdError.NoError)
            {
                JObject jObject = PasswdErrors.errorHandler(Program.errorStatus);
                Response.StatusCode = (int)jObject["StatusCode"];

                result = jObject.ToString();
            }
            else
            {
                result = @"Groups found using user's gid: 
" + APIMethods.GetGroupsByUser(Program.dataSet, id) + @"
Groups found using user's name as a member: 
" + APIMethods.GetGroupsByMember(Program.dataSet, id);
            }

            return(result);
        }