Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-10 Thread Stephen McDonald
On Sun, Jun 8, 2014 at 8:18 AM, Ahmad Khayyat akhay...@gmail.com wrote: There is one issue with the current approach. The exception message is shown using Django messages, which displays the message at the top of the page. If the page tree is scrolled down, the user will see that the illegal

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Ahmad Khayyat
​Pull request implementing can_move during page moves only: https://bitbucket.org/stephenmcd/mezzanine/pull-request/64/ - Interface: can_move(request, new_parent)​ ​. Raises a PageMoveException if permission is denied. Does not return anything. - Docs included. - Not called during page creation,

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Stephen McDonald
Looks great Ahmad, thanks a lot for putting up with all my feedback. I'll try and merge this in before the next release which I hope to get out over the next day or so. On Sun, Jun 8, 2014 at 12:35 AM, Ahmad Khayyat akhay...@gmail.com wrote: ​Pull request implementing can_move during page

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-07 Thread Ahmad Khayyat
There is one issue with the current approach. The exception message is shown using Django messages, which displays the message at the top of the page. If the page tree is scrolled down, the user will see that the illegal move move was reverted, but will not see the message, which is unsettling!

Re: [mezzanine-users] Re: Proposal: can_move permission (was: page_move signals)

2014-06-06 Thread Stephen McDonald
I'm for it given a few outstanding things: - If this only occurs in the move view now, I don't think we need the three-tuple return from can_move. Let's just have the api be raising a PageMoveException that can include the error message in it. - Need to document this (there's already a Page