I wrote this list before on this issue: http://drupal.org/node/166557; but, received no response. Decided to re-pose the question. The problem is that I'm getting the "access denied" error on file upload even though the file is uploaded. This is because user_access('upload files') is failing for a user who, in fact, has this permission in this particular group. I did the following: 1. Modified user_access() function to NOT cache the $perm permissions. 2. Deleted records from cache_menu. I don't know which (if not both) of the above did the trick, but it resolved the issue. That means (I think) it's a cache problem. I know I can use cache_clear_all() to delete items from cache_menu. However, I would like know if it's possible to delete/modify the static $perm variable that is set in the user_access() function OUTSIDE of that function? That is: The user_access() function sets a static variable $perm = array(). Permissions are cached in this variable. Can I create a function in my module that can update the $perm variable that is set in the user_access() function of the node.module? Thanks for any assistance. -ron -- Ron Parker Software Creations http://www.scbbs.com Self-Administration Web Site http://saw.scbbs.com SDSS Subscription Mgmt Service http://sdss.scbbs.com Central Ave Dance Ensemble http://www.centralavedance.com R & B Salsa http://www.randbsalsa.com
Quoting Ron Parker <sysop@scbbs.com>:
That is: The user_access() function sets a static variable $perm = array(). Permissions are cached in this variable. Can I create a function in my module that can update the $perm variable that is set in the user_access() function of the node.module?
A variable declared within a function is private to the function unless the function declares it as global. Earnie
it is reasonable to add a param to user_access() called $reset which if true, kills $perm at beginning of function. this is how other static caches get rebuilt on demand in drupal. On 8/23/07, Ron Parker <sysop@scbbs.com> wrote:
I wrote this list before on this issue: http://drupal.org/node/166557; but, received no response. Decided to re-pose the question.
The problem is that I'm getting the "access denied" error on file upload even though the file is uploaded. This is because user_access('upload files') is failing for a user who, in fact, has this permission in this particular group.
I did the following:
1. Modified user_access() function to NOT cache the $perm permissions. 2. Deleted records from cache_menu.
I don't know which (if not both) of the above did the trick, but it resolved the issue. That means (I think) it's a cache problem.
I know I can use cache_clear_all() to delete items from cache_menu. However, I would like know if it's possible to delete/modify the static $perm variable that is set in the user_access() function OUTSIDE of that function?
That is: The user_access() function sets a static variable $perm = array(). Permissions are cached in this variable. Can I create a function in my module that can update the $perm variable that is set in the user_access() function of the node.module?
Thanks for any assistance.
-ron
-- Ron Parker Software Creations http://www.scbbs.com Self-Administration Web Site http://saw.scbbs.com SDSS Subscription Mgmt Service http://sdss.scbbs.com Central Ave Dance Ensemble http://www.centralavedance.com R & B Salsa http://www.randbsalsa.com
Hiya Drupal-powers-that-be, jQuery 1.1.4 was released today. I was wondering if Drupal 6 will remain targeted at 1.1.3, or if we should jump in and start testing 1.1.4 for conflicts? thanks, -tao
From the speed enhancements alone, I'd say yes:
http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/ If 1.2 is going to be out in September, i'd thought the option is on the table to include that with Drupal 6? -Peter On 8/24/07, Tao Starbow <starbow@citris-uc.org> wrote:
Hiya Drupal-powers-that-be,
jQuery 1.1.4 was released today. I was wondering if Drupal 6 will remain targeted at 1.1.3, or if we should jump in and start testing 1.1.4 for conflicts?
thanks, -tao
Please do not start new threads by replying to an existing e-mail and deleting all information. The internal message ID stays there and the thread cannot be properly displayed by many e-mail-clients. Konstantin Käfer — http://kkaefer.com/
Sorry, Unintentional I assure you. On Aug 28, 2007, at 8:48 AM, Konstantin Käfer wrote:
Please do not start new threads by replying to an existing e-mail and deleting all information. The internal message ID stays there and the thread cannot be properly displayed by many e-mail-clients.
Konstantin Käfer — http://kkaefer.com/
Yes, that would be perfect. The problem is that this functionality is currently not in user_access(). I looked at the php docs and see that this is possible, but the only way to implement it in user_access() would be to modify the user.module -- which I'm trying to avoid. Quoting Moshe Weitzman <weitzman@tejasa.com>:
it is reasonable to add a param to user_access() called $reset which if true, kills $perm at beginning of function. this is how other static caches get rebuilt on demand in drupal.
On 8/23/07, Ron Parker <sysop@scbbs.com> wrote:
I wrote this list before on this issue: http://drupal.org/node/166557; but, received no response. Decided to re-pose the question.
The problem is that I'm getting the "access denied" error on file upload even though the file is uploaded. This is because user_access('upload files') is failing for a user who, in fact, has this permission in this particular group.
I did the following:
1. Modified user_access() function to NOT cache the $perm permissions. 2. Deleted records from cache_menu.
I don't know which (if not both) of the above did the trick, but it resolved the issue. That means (I think) it's a cache problem.
I know I can use cache_clear_all() to delete items from cache_menu. However, I would like know if it's possible to delete/modify the static $perm variable that is set in the user_access() function OUTSIDE of that function?
That is: The user_access() function sets a static variable $perm = array(). Permissions are cached in this variable. Can I create a function in my module that can update the $perm variable that is set in the user_access() function of the node.module?
Thanks for any assistance.
-ron
-- Ron Parker Software Creations http://www.scbbs.com Self-Administration Web Site http://saw.scbbs.com SDSS Subscription Mgmt Service http://sdss.scbbs.com Central Ave Dance Ensemble http://www.centralavedance.com R & B Salsa http://www.randbsalsa.com
participants (8)
-
David Metzler -
Earnie Boyd -
Konstantin Käfer -
Moshe Weitzman -
Peter Wolanin -
Ron Parker -
sysop@scbbs.com -
Tao Starbow