{"action":"opened","number":309,"pull_request":{"url":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309","id":93497369,"html_url":"https://github.com/mdmsoft/yii2-admin/pull/309","diff_url":"https://github.com/mdmsoft/yii2-admin/pull/309.diff","patch_url":"https://github.com/mdmsoft/yii2-admin/pull/309.patch","issue_url":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/309","number":309,"state":"open","locked":false,"title":"- Added multi app (frontend/backend) support.","user":{"login":"firefox747","id":10910907,"avatar_url":"https://avatars.githubusercontent.com/u/10910907?v=3","gravatar_id":"","url":"https://api.github.com/users/firefox747","html_url":"https://github.com/firefox747","followers_url":"https://api.github.com/users/firefox747/followers","following_url":"https://api.github.com/users/firefox747/following{/other_user}","gists_url":"https://api.github.com/users/firefox747/gists{/gist_id}","starred_url":"https://api.github.com/users/firefox747/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firefox747/subscriptions","organizations_url":"https://api.github.com/users/firefox747/orgs","repos_url":"https://api.github.com/users/firefox747/repos","events_url":"https://api.github.com/users/firefox747/events{/privacy}","received_events_url":"https://api.github.com/users/firefox747/received_events","type":"User","site_admin":false},"body":"Since i would like this extension to work with Yii2s advanced template, i made some modifications.\r\nBasically, if you do not configure anything, this PR still works as the original with support for the basic application template.\r\nYou can however configure multiple apps according to your individual (or default advanced) template. For this feature to work i use the Configs->advanced property.\r\nFor example, the following array in @common/config/params.php configures this extension to work with the Yii2 advanced template.\r\n\r\n```\r\n'mdm.admin.configs' => [\r\n        'advanced' => [\r\n            'app-backend' => [\r\n                '@common/config/main.php',\r\n                '@common/config/main-local.php',\r\n                '@backend/config/main.php',\r\n                '@backend/config/main-local.php',\r\n            ],\r\n            'app-frontend' => [\r\n                '@common/config/main.php',\r\n                '@common/config/main-local.php',\r\n                '@frontend/config/main.php',\r\n                '@frontend/config/main-local.php',\r\n            ],\r\n        ],\r\n    ],\r\n```\r\n\r\n**advanced** needs to be an array. Each item consists of\r\n**key**: (_string_) application id as defined in @{app}/config/main.php (**app-backend** and **app-frontend** in this configuration) and\r\n**value**: (_array_) of configuration files used by the respective application. I use the Yii::getAlias() method, so using aliases works fine.\r\n\r\nNow you can set up the module part of this extension only in the backend of your application. There you can access all application wide routes. So you are able, for example, to grant User1 access to the a specific action or controller in the frontend (_@app-frontend/demo/some-action_), while giving User2 access to the same action or controller in the backend (_@app-backend/demo/some-action_).\r\nThe advanced routes contain the application id as prefix, e.g. **@app-backend/admin/*** or **@app-frontend/***\r\n\r\n\r\n","created_at":"2016-11-14T01:43:56Z","updated_at":"2016-11-14T01:43:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309/commits","review_comments_url":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309/comments","review_comment_url":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/309/comments","statuses_url":"https://api.github.com/repos/mdmsoft/yii2-admin/statuses/17d3f8b063cb881dbc4865a020950653a4b446de","head":{"label":"firefox747:advanced","ref":"advanced","sha":"17d3f8b063cb881dbc4865a020950653a4b446de","user":{"login":"firefox747","id":10910907,"avatar_url":"https://avatars.githubusercontent.com/u/10910907?v=3","gravatar_id":"","url":"https://api.github.com/users/firefox747","html_url":"https://github.com/firefox747","followers_url":"https://api.github.com/users/firefox747/followers","following_url":"https://api.github.com/users/firefox747/following{/other_user}","gists_url":"https://api.github.com/users/firefox747/gists{/gist_id}","starred_url":"https://api.github.com/users/firefox747/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firefox747/subscriptions","organizations_url":"https://api.github.com/users/firefox747/orgs","repos_url":"https://api.github.com/users/firefox747/repos","events_url":"https://api.github.com/users/firefox747/events{/privacy}","received_events_url":"https://api.github.com/users/firefox747/received_events","type":"User","site_admin":false},"repo":{"id":73293831,"name":"yii2-admin","full_name":"firefox747/yii2-admin","owner":{"login":"firefox747","id":10910907,"avatar_url":"https://avatars.githubusercontent.com/u/10910907?v=3","gravatar_id":"","url":"https://api.github.com/users/firefox747","html_url":"https://github.com/firefox747","followers_url":"https://api.github.com/users/firefox747/followers","following_url":"https://api.github.com/users/firefox747/following{/other_user}","gists_url":"https://api.github.com/users/firefox747/gists{/gist_id}","starred_url":"https://api.github.com/users/firefox747/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firefox747/subscriptions","organizations_url":"https://api.github.com/users/firefox747/orgs","repos_url":"https://api.github.com/users/firefox747/repos","events_url":"https://api.github.com/users/firefox747/events{/privacy}","received_events_url":"https://api.github.com/users/firefox747/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/firefox747/yii2-admin","description":"Auth manager for Yii2 (RBAC Manager)","fork":true,"url":"https://api.github.com/repos/firefox747/yii2-admin","forks_url":"https://api.github.com/repos/firefox747/yii2-admin/forks","keys_url":"https://api.github.com/repos/firefox747/yii2-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firefox747/yii2-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firefox747/yii2-admin/teams","hooks_url":"https://api.github.com/repos/firefox747/yii2-admin/hooks","issue_events_url":"https://api.github.com/repos/firefox747/yii2-admin/issues/events{/number}","events_url":"https://api.github.com/repos/firefox747/yii2-admin/events","assignees_url":"https://api.github.com/repos/firefox747/yii2-admin/assignees{/user}","branches_url":"https://api.github.com/repos/firefox747/yii2-admin/branches{/branch}","tags_url":"https://api.github.com/repos/firefox747/yii2-admin/tags","blobs_url":"https://api.github.com/repos/firefox747/yii2-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firefox747/yii2-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firefox747/yii2-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/firefox747/yii2-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firefox747/yii2-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/firefox747/yii2-admin/languages","stargazers_url":"https://api.github.com/repos/firefox747/yii2-admin/stargazers","contributors_url":"https://api.github.com/repos/firefox747/yii2-admin/contributors","subscribers_url":"https://api.github.com/repos/firefox747/yii2-admin/subscribers","subscription_url":"https://api.github.com/repos/firefox747/yii2-admin/subscription","commits_url":"https://api.github.com/repos/firefox747/yii2-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/firefox747/yii2-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/firefox747/yii2-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/firefox747/yii2-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/firefox747/yii2-admin/contents/{+path}","compare_url":"https://api.github.com/repos/firefox747/yii2-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firefox747/yii2-admin/merges","archive_url":"https://api.github.com/repos/firefox747/yii2-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firefox747/yii2-admin/downloads","issues_url":"https://api.github.com/repos/firefox747/yii2-admin/issues{/number}","pulls_url":"https://api.github.com/repos/firefox747/yii2-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/firefox747/yii2-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/firefox747/yii2-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firefox747/yii2-admin/labels{/name}","releases_url":"https://api.github.com/repos/firefox747/yii2-admin/releases{/id}","deployments_url":"https://api.github.com/repos/firefox747/yii2-admin/deployments","created_at":"2016-11-09T15:00:46Z","updated_at":"2016-11-09T15:00:47Z","pushed_at":"2016-11-14T01:06:42Z","git_url":"git://github.com/firefox747/yii2-admin.git","ssh_url":"git@github.com:firefox747/yii2-admin.git","clone_url":"https://github.com/firefox747/yii2-admin.git","svn_url":"https://github.com/firefox747/yii2-admin","homepage":"","size":2291,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mdmsoft:master","ref":"master","sha":"624338912074ce7c218f838a940fbfed05ae47db","user":{"login":"mdmsoft","id":5996532,"avatar_url":"https://avatars.githubusercontent.com/u/5996532?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmsoft","html_url":"https://github.com/mdmsoft","followers_url":"https://api.github.com/users/mdmsoft/followers","following_url":"https://api.github.com/users/mdmsoft/following{/other_user}","gists_url":"https://api.github.com/users/mdmsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmsoft/subscriptions","organizations_url":"https://api.github.com/users/mdmsoft/orgs","repos_url":"https://api.github.com/users/mdmsoft/repos","events_url":"https://api.github.com/users/mdmsoft/events{/privacy}","received_events_url":"https://api.github.com/users/mdmsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":14681791,"name":"yii2-admin","full_name":"mdmsoft/yii2-admin","owner":{"login":"mdmsoft","id":5996532,"avatar_url":"https://avatars.githubusercontent.com/u/5996532?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmsoft","html_url":"https://github.com/mdmsoft","followers_url":"https://api.github.com/users/mdmsoft/followers","following_url":"https://api.github.com/users/mdmsoft/following{/other_user}","gists_url":"https://api.github.com/users/mdmsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmsoft/subscriptions","organizations_url":"https://api.github.com/users/mdmsoft/orgs","repos_url":"https://api.github.com/users/mdmsoft/repos","events_url":"https://api.github.com/users/mdmsoft/events{/privacy}","received_events_url":"https://api.github.com/users/mdmsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdmsoft/yii2-admin","description":"Auth manager for Yii2 (RBAC Manager)","fork":false,"url":"https://api.github.com/repos/mdmsoft/yii2-admin","forks_url":"https://api.github.com/repos/mdmsoft/yii2-admin/forks","keys_url":"https://api.github.com/repos/mdmsoft/yii2-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdmsoft/yii2-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdmsoft/yii2-admin/teams","hooks_url":"https://api.github.com/repos/mdmsoft/yii2-admin/hooks","issue_events_url":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/events{/number}","events_url":"https://api.github.com/repos/mdmsoft/yii2-admin/events","assignees_url":"https://api.github.com/repos/mdmsoft/yii2-admin/assignees{/user}","branches_url":"https://api.github.com/repos/mdmsoft/yii2-admin/branches{/branch}","tags_url":"https://api.github.com/repos/mdmsoft/yii2-admin/tags","blobs_url":"https://api.github.com/repos/mdmsoft/yii2-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdmsoft/yii2-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdmsoft/yii2-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdmsoft/yii2-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdmsoft/yii2-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/mdmsoft/yii2-admin/languages","stargazers_url":"https://api.github.com/repos/mdmsoft/yii2-admin/stargazers","contributors_url":"https://api.github.com/repos/mdmsoft/yii2-admin/contributors","subscribers_url":"https://api.github.com/repos/mdmsoft/yii2-admin/subscribers","subscription_url":"https://api.github.com/repos/mdmsoft/yii2-admin/subscription","commits_url":"https://api.github.com/repos/mdmsoft/yii2-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdmsoft/yii2-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdmsoft/yii2-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdmsoft/yii2-admin/contents/{+path}","compare_url":"https://api.github.com/repos/mdmsoft/yii2-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdmsoft/yii2-admin/merges","archive_url":"https://api.github.com/repos/mdmsoft/yii2-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdmsoft/yii2-admin/downloads","issues_url":"https://api.github.com/repos/mdmsoft/yii2-admin/issues{/number}","pulls_url":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/mdmsoft/yii2-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/mdmsoft/yii2-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdmsoft/yii2-admin/labels{/name}","releases_url":"https://api.github.com/repos/mdmsoft/yii2-admin/releases{/id}","deployments_url":"https://api.github.com/repos/mdmsoft/yii2-admin/deployments","created_at":"2013-11-25T09:47:03Z","updated_at":"2016-11-11T16:35:20Z","pushed_at":"2016-11-09T23:09:48Z","git_url":"git://github.com/mdmsoft/yii2-admin.git","ssh_url":"git@github.com:mdmsoft/yii2-admin.git","clone_url":"https://github.com/mdmsoft/yii2-admin.git","svn_url":"https://github.com/mdmsoft/yii2-admin","homepage":"","size":2487,"stargazers_count":518,"watchers_count":518,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":325,"mirror_url":null,"open_issues_count":102,"forks":325,"open_issues":102,"watchers":518,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309"},"html":{"href":"https://github.com/mdmsoft/yii2-admin/pull/309"},"issue":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/309"},"comments":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/mdmsoft/yii2-admin/statuses/17d3f8b063cb881dbc4865a020950653a4b446de"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":114,"deletions":25,"changed_files":3}}
{"actor":{"display_login":"firefox747"}}