{"action":"created","issue":{"url":"https://api.github.com/repos/structr/structr/issues/324","labels_url":"https://api.github.com/repos/structr/structr/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/structr/structr/issues/324/comments","events_url":"https://api.github.com/repos/structr/structr/issues/324/events","html_url":"https://github.com/structr/structr/issues/324","id":55723051,"number":324,"title":"Issue invoking custom method varies by user","user":{"login":"eric-schleicher","id":8261783,"avatar_url":"https://avatars.githubusercontent.com/u/8261783?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-schleicher","html_url":"https://github.com/eric-schleicher","followers_url":"https://api.github.com/users/eric-schleicher/followers","following_url":"https://api.github.com/users/eric-schleicher/following{/other_user}","gists_url":"https://api.github.com/users/eric-schleicher/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-schleicher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-schleicher/subscriptions","organizations_url":"https://api.github.com/users/eric-schleicher/orgs","repos_url":"https://api.github.com/users/eric-schleicher/repos","events_url":"https://api.github.com/users/eric-schleicher/events{/privacy}","received_events_url":"https://api.github.com/users/eric-schleicher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-28T07:25:06Z","updated_at":"2015-01-28T23:27:36Z","closed_at":null,"body":"I have a simple MailSignup Entity on which I've create a custom method called syncSignup\r\n\r\n**The Entity looks like this:**\r\n![image](https://cloud.githubusercontent.com/assets/8261783/5933656/67d2046c-a678-11e4-9572-7fa58cb93efe.png)\r\n\r\nI also have an admin page for this MailSignup that looks like this:  the primary purpose of this page is to allow an operator (who is appropriate authorized) to push new signups over the mailchimp api to the list.\r\n![image](https://cloud.githubusercontent.com/assets/8261783/5933675/a8dbfdbe-a678-11e4-91d2-4643d8c27b60.png)\r\n\r\n\r\nThis page has a button wired up to this custom method. Per previous discussion with Structr team here is how the method is being called via the button properties dialog:\r\n![image](https://cloud.githubusercontent.com/assets/8261783/5933769/fb47521e-a679-11e4-90a7-b9e161bbd895.png)\r\n\r\nhere is sample HTML output from view:source\r\n````html\r\n<tr>\r\n                  <td>redacted@gmail.com</td>\r\n                  <td>false</td>\r\n                  <td>\r\n                    <button data-structr-id=\"3db538f1085f4f0fb76ebf1c57ef1046\" data-structr-action=\"syncSignup:MailSignup\" data-structr-reload=\"false\">Submit\t</button>\r\n                  </td>\r\n                  <td>Initial text for td</td>\r\n                </tr>\r\n````\r\n# Issue: \r\n\r\n##### When logged on as an admin user i get the following log output\r\n````\r\nWARNING: Unable to invoke method syncSignup: object is not an instance of declaring class\r\nemail address to push to mailchimp list:redacted@gmail.com\r\nec5c9d923b180e853322eevv79f7662ac15286d6-us3\r\n0f8222f117\r\n{\"apikey\" : \"ef9f9f9f9f9f9f9f9f9f9f9f9fc454c494d9223bc1d8bd0de8579f7662ac15286d6-us3\",  \"list\" : \"0ffft85e2ac715722f117\" , \"email\" : \"redaccted@gmail.com\"curlybrace\r\n````\r\n\r\n**Observation(s):** \r\n- The id being passed is ABSOLUTELY a mailSignup Entity\r\n- Despite the message the code runs anyways \r\n\r\n##### When logged in as a non-admin user, i get no output at all indicating either the method entity type mismatch, or the print statements from within the method code block.\r\n\r\n[update]  web access log shows 401 for non-admin users.  so this is a resource access issue methinks.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/structr/structr/issues/comments/71938973","html_url":"https://github.com/structr/structr/issues/324#issuecomment-71938973","issue_url":"https://api.github.com/repos/structr/structr/issues/324","id":71938973,"user":{"login":"amorgner","id":291266,"avatar_url":"https://avatars.githubusercontent.com/u/291266?v=3","gravatar_id":"","url":"https://api.github.com/users/amorgner","html_url":"https://github.com/amorgner","followers_url":"https://api.github.com/users/amorgner/followers","following_url":"https://api.github.com/users/amorgner/following{/other_user}","gists_url":"https://api.github.com/users/amorgner/gists{/gist_id}","starred_url":"https://api.github.com/users/amorgner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amorgner/subscriptions","organizations_url":"https://api.github.com/users/amorgner/orgs","repos_url":"https://api.github.com/users/amorgner/repos","events_url":"https://api.github.com/users/amorgner/events{/privacy}","received_events_url":"https://api.github.com/users/amorgner/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T23:27:36Z","updated_at":"2015-01-28T23:27:36Z","body":"This is just a warning, should be removed from the logs. WDYT @cmorgner?"}}