-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login as user pre admina #354
Comments
Vyzera, ze to pojde takto: V Tento view nastavi Potom v
Test, ci ide o admin URL alebo by som nerobil regexpom ako si pisal, ale skusil by som najst view pre danu URL a nejak zistit, ci to je admin view, alebo nie. V okrajovych pripadoch, napriklad ak Tento upraveny auth backend by sa zislo definovat niekde v |
V separatnom PR treba doplnit Edit: Vydelene do separatnej issue: #424 |
* #354 Login user from admin * #354 Remodel AdminLoginAsBackend * #354 Add review suggestions * #354 Create AdminLoginAsMixin * #354 Move AdminLoginAsMixin to poleno library * #354 Move AdminLoginAsAdminMixin to poleno directory * #354 Allow admin_login_as from UserAdmin and fix wrong pk in ProfileAdmin * #354 Create AccountAdapter * #354 Rename login_as_redirect_viewname attribute to lowercase * #354 Set authentication_backend path * #354 Remove unused import
@mmmaly Tool pre admina na login as user je hotovy. Pls pretestuj. |
Otestovane. |
* #354 Login user from admin * #354 Remodel AdminLoginAsBackend * #354 Add review suggestions * #354 Create AdminLoginAsMixin * #354 Move AdminLoginAsMixin to poleno library * #354 Move AdminLoginAsAdminMixin to poleno directory * #354 Allow admin_login_as from UserAdmin and fix wrong pk in ProfileAdmin * #354 Create AccountAdapter * #354 Rename login_as_redirect_viewname attribute to lowercase * #354 Set authentication_backend path * #354 Remove unused import
Treba nam tool pre admina, aby sa mohol prihlasit ako lubovolny user a vykonat v jeho mene lubovolnu akciu. Bez toho, aby admin poznal userovo heslo.
Idea je, ze v admin detaile usera bude button "Login as user", na ktory ked admin klikne, tak mu to v novom tabe otvori web s prihlasenym userom. Pricom admin bude prihlaseny nadalej, aby stale mohol vykonavat akcie v admin rozhrani. Ale v tom novom tabe mohol vykonavat aj akcie ak user.
Tipujem, ze bude na to nejaka existujuca kniznica. Skus pogooglit, ci nieco nenajdes. Ak nic nenajdeme, tak skus nieco vymysliet. Zrejme by sa to implementovalo nejakou magiou so sessions. Ze v ramci admin session by sme si pamatali, ze admin je prihlaseny ako user X. A potom pri otvoreni non-admin obrazovky by sme usera identifikovali okrem standardnej user session aj cez admin session, ako je prihlaseny ako user X. Ak sa Ti nepodari nic vymysliet, zavolajme si k tomu a vymyslime to spolu.
Pre jednoduchost, mozeme tool obmedzit, ze admin moze byt naraz prihlaseny iba ako jeden user. Teda ak je admin prihlaseny ako user X a klikne na prihlasit ako dalsi user Y, tak ho od z usera X odhlasi.
The text was updated successfully, but these errors were encountered: