{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/8146","labels_url":"https://api.github.com/repos/odoo/odoo/issues/8146/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/8146/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/8146/events","html_url":"https://github.com/odoo/odoo/pull/8146","id":101907568,"number":8146,"title":"[ADD] convenience res_users._is_admin","user":{"login":"xmo-odoo","id":7571158,"avatar_url":"https://avatars.githubusercontent.com/u/7571158?v=3","gravatar_id":"","url":"https://api.github.com/users/xmo-odoo","html_url":"https://github.com/xmo-odoo","followers_url":"https://api.github.com/users/xmo-odoo/followers","following_url":"https://api.github.com/users/xmo-odoo/following{/other_user}","gists_url":"https://api.github.com/users/xmo-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xmo-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmo-odoo/subscriptions","organizations_url":"https://api.github.com/users/xmo-odoo/orgs","repos_url":"https://api.github.com/users/xmo-odoo/repos","events_url":"https://api.github.com/users/xmo-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/xmo-odoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-19T14:30:11Z","updated_at":"2015-08-19T16:33:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/8146","html_url":"https://github.com/odoo/odoo/pull/8146","diff_url":"https://github.com/odoo/odoo/pull/8146.diff","patch_url":"https://github.com/odoo/odoo/pull/8146.patch"},"body":"Checks that the provided user (or user in the provided dataset):\r\n\r\n* is the superadmin\r\n* or is a member of group_erp_manager\r\n\r\nThere are a number of hand-rolled \"is_admin\" checks in the codebase some\r\nof which are fairly gnarly. The shortcut provides a single point of\r\ncontact, avoids forgetting about cases (e.g. SUPERUSER_ID) and is\r\nrelatively convenient when checking a user which is not the \"current\"\r\nuser.\r\n\r\n/cc @odony @tde-banana-odoo @rco-odoo "},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/132687239","html_url":"https://github.com/odoo/odoo/pull/8146#issuecomment-132687239","issue_url":"https://api.github.com/repos/odoo/odoo/issues/8146","id":132687239,"user":{"login":"nhomar","id":338634,"avatar_url":"https://avatars.githubusercontent.com/u/338634?v=3","gravatar_id":"","url":"https://api.github.com/users/nhomar","html_url":"https://github.com/nhomar","followers_url":"https://api.github.com/users/nhomar/followers","following_url":"https://api.github.com/users/nhomar/following{/other_user}","gists_url":"https://api.github.com/users/nhomar/gists{/gist_id}","starred_url":"https://api.github.com/users/nhomar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhomar/subscriptions","organizations_url":"https://api.github.com/users/nhomar/orgs","repos_url":"https://api.github.com/users/nhomar/repos","events_url":"https://api.github.com/users/nhomar/events{/privacy}","received_events_url":"https://api.github.com/users/nhomar/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T16:33:59Z","updated_at":"2015-08-19T16:33:59Z","body":"that's cool...\r\n\r\nJust one point, the metadata will be written with SUPERUSER or with USER itself?\r\n\r\nBecuase that one of the actual deals about that."}}