Patches item #1687783, was opened at 2007-03-25 13:31
Message generated for change (Settings changed) made by bollini
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=319984&aid=1687783&group_id=19984

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Andrea Bollini (bollini)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improve API for "IgnoreAuthorization" blocks

Initial Comment:
The bug fix 1480496 (Cannot turn off "ignore authorization" flag!) 
has shown that the authorization method setIgnoreAuthorization() is not 
friendly. In fact if we have two blocks that require authorization check 
to false and these blocks are nested, as in the following example:
...[some java code here]...
setIgnoreAuthorization(true) // start of first block
---my first block without authorization check
---my first block without authorization check
---my first block without authorization check
------setIgnoreAuthorization(true) // start of second block
------my second block without authorization check
------my second block without authorization check
------my second block without authorization check
------setIgnoreAuthorization(false) // end of second block
---other code in first block
setIgnoreAuthorization(false) // end of first block
...
the "other code in first block" is executed with authorization check and 
does not work. It will be really too easy to come up with this situation 
(actually possible for my patch automapper) with the new code called by 
the Event System, so it should be fixed.
The simple solution, implemented in this patch, is to store the previous state 
of authorization check 
before changing it, and to restore it at the end of the "special" block.
This patch:
1) add two methods: TurnOffAuthorizationSystem / 
RestoreAuthorizationSystem, with some code that can also be useful when the 
debug is on to see "malformed" (XML-like) authorization blocks (thanks to James 
Rutherford for some useful suggestions);
2) set the setIgnoreAuthoritation methods to deprecated.
3) refactor any call to setIgnoreAuthorization in dspace code to use the new 
methods

----------------------------------------------------------------------

Comment By: Andrea Bollini (bollini)
Date: 2009-03-05 12:23

Message:
Hi Mark and all,
this patch is waiting for commit from long time... I have missed, till
now, your alternative strategy.
After a look, I think that most of changes are desiderable cleanup to the
dspace api but we need again a way to turn off temporary the auth system
for some consumers (Browse or my Automapper).
Anyone has objection to proceed with commit my original patch? 

----------------------------------------------------------------------

Comment By: Mark Diggory (mdiggory)
Date: 2007-03-30 21:16

Message:
Logged In: YES 
user_id=208348
Originator: NO

File Added: patch.txt

----------------------------------------------------------------------

Comment By: Andrea Bollini (bollini)
Date: 2007-03-25 13:38

Message:
Logged In: YES 
user_id=1293299
Originator: YES

File Added: ignoreAuthorizationPatchSVN

----------------------------------------------------------------------

Comment By: Andrea Bollini (bollini)
Date: 2007-03-25 13:32

Message:
Logged In: YES 
user_id=1293299
Originator: YES

File Added: ignoreAuthorizationPatchOnlyAPI-SVN

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=319984&aid=1687783&group_id=19984

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to