These are chat archives for allegro/ralph

4th
Nov 2015
Michał Suszko
@msuszko
Nov 04 2015 12:39
When one is not an admin he can't see (HTTP_403) tabs on DataCenterAssetAdmin despite having permissions granted (i.e. data_center.can_view_extra_datacenterassetcomponents)
This is actually quite tricky. ralph.lib.permissions.views.view_permission_dispatch.wraps returns HttpResponseForbidden because it looks for account.can_view_extra_datacenterassetcomponents
view_permission_dispatch wraps dispatch method twice: one time for RalphDetailView, and second time for RalphExtraViewMixin
as RalphExtraViewMixin consumes views and model arguments it dsappears from kwargs and becomes .models
Michał Suszko
@msuszko
Nov 04 2015 12:45
second wrapper can;t find models in kwargs, and looks for accounts. permission instead od data_center.
Mateusz Kurek
@mkurek
Nov 04 2015 12:46
@pydubreucq probably beginning of the December; @msuszko - could you create an issue for that? and we'll greatly appreciate pull request for that if you know where and what to fix :)
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:04
Hello, what progress is with Ralph 3? :)
✪ vi4m Marcin Kliks
@vi4m
Nov 04 2015 14:25
in short: almost everything for back office is ready (generating pdf documents, transitions, permissions), and we are working on domains contracts management, and admin logbook(operations log)
scan is not ready yet
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:27
@vi4m : When is planned release?
Michał Suszko
@msuszko
Nov 04 2015 14:34
@mkurek why don't you check permissions in RalphExtraViewMixin.dispatch? metaclass does .dispatch wrapping on RalphDetailView and all subclasses
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:34
@vi4m: Is any docker image with updated Ralph 3?
✪ vi4m Marcin Kliks
@vi4m
Nov 04 2015 14:35
previously we issued some deb packages
do you prefer deb or docker package?
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:35
deb
✪ vi4m Marcin Kliks
@vi4m
Nov 04 2015 14:36
ok then, i will issue a new one
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:36
Nice ;) I should looking for it tomorrow?
✪ vi4m Marcin Kliks
@vi4m
Nov 04 2015 14:37
i want to have this one: allegro/ralph#1855 and this one: allegro/ralph#1856 ready
MarcinJanowski
@MarcinJanowski
Nov 04 2015 14:37
ok
Mateusz Kurek
@mkurek
Nov 04 2015 14:40
@msuszko i don't know but i'm looking for this code now and PermissionViewMetaClass should be used in RalphExtraViewMixintoo - what do you think? Will this resolve your problem?
Michał Suszko
@msuszko
Nov 04 2015 14:46
@mkurek it would wrap one more .dispatch making it slightly less efficient, and not solving the problem
wrapping RalphDetailView.dispatch is fine, but metaclass wraps any RalphDetailView sublasseses .dispatch as well
moving wrapper from PermissionViewMetaClass straight to RalphExtraViewMixin.dispatch would work, but you need view list to initialize permissions
Michał Suszko
@msuszko
Nov 04 2015 16:53
@mkurek there are two problems: there is no way of knowing which View subclass is an abstract and which will be used, and setting .model attribute through .dispatch method
Mateusz Kurek
@mkurek
Nov 04 2015 16:55
@msuszko i could try to solve this on friday, but could you please create an issue for that with specific instructions, symptoms what's working wrong and how to repeat the error locally?
Michał Suszko
@msuszko
Nov 04 2015 17:07
ok, tomorrow
Mateusz Kurek
@mkurek
Nov 04 2015 17:10
ok