{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/49734","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/49734/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/49734/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/49734/events","html_url":"https://github.com/saltstack/salt/issues/49734","id":362617253,"node_id":"MDU6SXNzdWUzNjI2MTcyNTM=","number":49734,"title":"[grafana4_user] Set user organization/role. Make email optional","user":{"login":"bbczeuz","id":11089403,"node_id":"MDQ6VXNlcjExMDg5NDAz","avatar_url":"https://avatars3.githubusercontent.com/u/11089403?v=4","gravatar_id":"","url":"https://api.github.com/users/bbczeuz","html_url":"https://github.com/bbczeuz","followers_url":"https://api.github.com/users/bbczeuz/followers","following_url":"https://api.github.com/users/bbczeuz/following{/other_user}","gists_url":"https://api.github.com/users/bbczeuz/gists{/gist_id}","starred_url":"https://api.github.com/users/bbczeuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbczeuz/subscriptions","organizations_url":"https://api.github.com/users/bbczeuz/orgs","repos_url":"https://api.github.com/users/bbczeuz/repos","events_url":"https://api.github.com/users/bbczeuz/events{/privacy}","received_events_url":"https://api.github.com/users/bbczeuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-21T13:30:28Z","updated_at":"2018-09-21T13:30:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description of Issue/Question\r\n* The current grafana4_user state does not allow a user to be added to organizations. The current approach is to add users to organizations when creating an organization. This asks for two states to run, instead of doing everything in one state and keep all user relevant information at one place.\r\n* The email parameter is required by the grafana4_user.present module. For Grafana itself if the logon name (name in grafana4_user state) is given, email is optional.\r\n* There is no state function to set a user's default organization\r\n\r\n### Setup\r\n* Grafana 4.5.2\r\n* Salt 2018.3.2\r\n* Debian9\r\n\r\n### Steps to Reproduce Issue\r\ntest/add_grafana_org.sls\r\n```\r\ntest grafana org:\r\n  grafana4_org.present:\r\n    - name: 'TestOrg'\r\n    - users:\r\n        TestUser: Admin\r\n```\r\n\r\ntest/add_grafana_user.sls\r\n```\r\ntest grafana user:\r\n  grafana4_user.present:\r\n    - name: 'TestUser'\r\n    - password: 123456789\r\n    - fullname: blabla\r\n```\r\n\r\n### Versions Report\r\n```\r\nSalt Version:\r\n           Salt: 2018.3.2\r\n \r\nDependency Versions:\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: 2.5.3\r\n      docker-py: 1.9.0\r\n          gitdb: 2.0.0\r\n      gitpython: 2.1.1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.9.4\r\n        libgit2: 0.24.5\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.8\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n   pycryptodome: Not Installed\r\n         pygit2: 0.24.2\r\n         Python: 2.7.13 (default, Nov 24 2017, 17:33:09)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.12\r\n          PyZMQ: 16.0.2\r\n           RAET: Not Installed\r\n          smmap: 2.0.1\r\n        timelib: Not Installed\r\n        Tornado: 4.4.3\r\n            ZMQ: 4.2.1\r\n \r\nSystem Versions:\r\n           dist: debian 9.5 \r\n         locale: UTF-8\r\n        machine: x86_64\r\n        release: 4.9.0-8-amd64\r\n         system: Linux\r\n        version: debian 9.5 \r\n```\r\n"}}
{"actor":{"display_login":"bbczeuz"}}