This content has been marked as final.
Show 11 replies
-
1. Re: public_check_authorization deprecated??
Peeteba Mar 28, 2013 7:22 AM (in response to Peeteba)Let's bring this one up again.
Anyone having an idea?
APEX development team maybe? Patrick Wolf? ...
I use this function very often so if I shouldn't do this anymore, it would be nice to know this.
Regards,
Bart -
2. Re: public_check_authorization deprecated??
Christian Neumueller-Oracle Mar 28, 2013 2:24 PM (in response to Peeteba)Hi Bart,
we have a newer API, it's called apex_authorization.is_authorized. Unfortunately, the documentation for this package didn't make it into 4.2.
Even in later releases, there are no plans to actually remove existing documented APIs. We just want to provide better encapsulated APIs and encourage people to use these, because apex_util is a bit unwieldy.
Regards,
Christian -
3. Re: public_check_authorization deprecated??
partlycloudy Mar 28, 2013 5:10 PM (in response to Christian Neumueller-Oracle)Christian - Huh, didn't realize a new API had snuck into the distribution. apex_authorization looks very useful. Question about apex_authorization.reset_cache - Does including the APP keyword in the clear cache position of the f?p= URL do this as well? Or is using this new API the only way? -
4. Re: public_check_authorization deprecated??
Christian Neumueller-Oracle Mar 28, 2013 5:39 PM (in response to partlycloudy)Hi Vikas,
the APP keyword only resets session state, not the cached authorizations. Can you give a use case where this should also reset authorizations?
Regards,
Christian -
5. Re: public_check_authorization deprecated??
partlycloudy Mar 28, 2013 5:58 PM (in response to Christian Neumueller-Oracle)Well, the APEX Builder has several declarative methods where we fill in various components of the f?p= URL and the engine constructs the f?p= URL. The use cases that come to mind are in apps that involve some sort of "emulate user" function which would basically do a "logout/login as some other user" but without actually logging out. In these cases, it would be handy if the APP keyword were to clear cached authorizations as well. Of course, there is almost always a page submit involved so it is just as easy to stick a call to apex_authorization.reset_cache in a after-submit component but I thought I would ask.
So, if I understand you correctly, using this new (in 4.x?) API is the only way to reset cached authorizations? -
6. Re: public_check_authorization deprecated??
Christian Neumueller-Oracle Mar 28, 2013 6:34 PM (in response to partlycloudy)For "emulate user", I would use apex_authentication.post_login. This overwrites the user in the session and automatically resets authorizations. I guess it does not hurt to also reset on an APP clear cache request, but I would have to test this.
In releases before 4.2, the reset cached authorizations feature was already present via apex_util.reset_authorizations.
Regards,
Christian -
7. Re: public_check_authorization deprecated??
Peeteba Mar 29, 2013 9:16 AM (in response to Christian Neumueller-Oracle)Thanks Christian for the reply.
This explains the debug line. Maybe it would be less confusing to point out to the new API instead of just mentioning the used function is deprecated.
I took a quick look into the package specification and I'll start using the new API instead of APEX_UTIL.
Regards,
Bart -
8. Re: public_check_authorization deprecated??
ascheffer Mar 29, 2013 9:34 AM (in response to Christian Neumueller-Oracle)Are there any more undocumented API's which people are encouraged to use, or is this the only one? -
9. Re: public_check_authorization deprecated??
Christian Neumueller-Oracle Mar 29, 2013 11:57 AM (in response to ascheffer)Hi,
the deprecation messages were a bit premature, as I tried to explain above. They should not have been added without proper documentation of the newer APIs and you can just ignore them for now. Maybe we will include a reference to the newer APIs in the messages in 5.0, that sounds convenient.
Regards,
Christian -
10. Re: public_check_authorization deprecated??
ascheffer Mar 29, 2013 12:04 PM (in response to Christian Neumueller-Oracle)My concern wasn't about premature deprication, but about your current advise to use undocumented API's -
11. Re: public_check_authorization deprecated??
Christian Neumueller-Oracle Mar 29, 2013 12:46 PM (in response to ascheffer)I never gave that advice, but explained the reason for this message and that it was premature, since the documentation is still missing. These kinds of messages should encourage people to use newer APIs, but the debug messages should not have been included without docs.
Since doc for apex_authorization was only excluded by mistake and will be added in a later release, people can already use it in 4.2.x, if they want.