yiisoft/yii2 — pull request #4435 by tvdavid (2014-07-24 19:08:34+00:00)
Title: RBAC assignments that only apply to the current request

Relates to #4430

This allows you to create RBAC assignments that won't persist to the database or file backend, but which only apply to the current request.

For example, you can develop your application while logged in as a regular user that doesn't have any special roles; then make a call to `authManager->assign($persistent = false)` (based on a cookie/post/get value) to view that page as administrator/moderator/whatever - without having to regenerate your RBAC rules or create/remove assignments every time you want to switch between roles.