<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Gerhard Killesreiter wrote:<br>
<blockquote cite="mid460B64AC.9070909@killesreiter.de" type="cite">
<pre wrap="">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ron Parker schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">
That, essentially, is the modification to user_access that I have
created so that my module would work. Briefly, my OG User Roles module
is designed to assign role(s) to a user restricted to the OG group he is
in. Details on it are here: <a class="moz-txt-link-freetext" href="http://drupal.org/node/87679">http://drupal.org/node/87679</a>.
</pre>
</blockquote>
<pre wrap=""><!---->
IMO you are trying to use the role system for something it wasn't
designed for: Dynamically asigned roles. Drupal roles are always static.
</pre>
</blockquote>
Bingo! I seek to propose a hook that would essentially allow the role
system to become dynamic.<br>
<blockquote cite="mid460B64AC.9070909@killesreiter.de" type="cite">
<pre wrap=""></pre>
<blockquote type="cite">
<pre wrap="">
What else, besides user_access, does the default node/add mechanism call
for permissions checks?
</pre>
</blockquote>
<pre wrap=""><!---->
Nothing. You probably need to rebuild the user's menu to get your
changed permisions to "take".
</pre>
</blockquote>
Since my modified user_access currently works for
list/view/update/delete, the menu system works perfectly. The correct
create content links to add the correct node types for a role appear as
they should. The problem is when I click on <b>node/add/<node
type>?gids[]=<group nid></b>, the user gets "access denied". <b>user_access</b>
returns the correct roles, but there is something else in the <b>node/add</b>
process that causes this process to fail. My guess right now is that <b>$user->roles</b>
is called somewhere else in the process (outside of where it's called
in <b>user_access</b>), and that's causing the failure. <br>
<br>
Problem is, I just can't locate where this is.<br>
<blockquote cite="mid460B64AC.9070909@killesreiter.de" type="cite">
<pre wrap="">Since rebuilding the menu is a costly operation (in Drupal5) I am not
too excited about dynamically assigned roles.
</pre>
</blockquote>
I understand, and appreciate your response. OG dynamically rebuilds
it's menu each time, so the overhead would be the same. And, again,
the OG menu uses my modified <b>user_access</b> to build the correct
menu according to group role(s).<br>
<pre class="moz-signature" cols="72">--
Ron Parker
Software Creations <a class="moz-txt-link-freetext" href="http://www.scbbs.com">http://www.scbbs.com</a>
Self-Administration Web Site <a class="moz-txt-link-freetext" href="http://saw.scbbs.com">http://saw.scbbs.com</a>
SDSS Subscription Mgmt Service <a class="moz-txt-link-freetext" href="http://sdss.scbbs.com">http://sdss.scbbs.com</a>
Central Ave Dance Ensemble <a class="moz-txt-link-freetext" href="http://www.centralavedance.com">http://www.centralavedance.com</a>
R & B Salsa <a class="moz-txt-link-freetext" href="http://www.randbsalsa.com">http://www.randbsalsa.com</a>
</pre>
</body>
</html>