If your node type is associated with one vocabulary which has only one term access to its node form will be denied. Adding another term will fix the problem.
To repeat:
1. Create a node type.
2. Create a vocab..
3. Create a term.
3. Install Term Permission.
4. Create a user account with limited permissions (i.e. not user 1) and switch to that account.
5. Go to node/add/yourcontenttype
You'll likely get "access denied".
If not, edit the term and set it to allow access by one or more of the roles the account you created in step 3 has. Try again. This should result in access denied.
To resolve:
1. Create a new term in the vocabulary you created in step 2.
2. Do not alter permission for this term, leave all roles unchecked.
Using the account you created in step 3 above, go to the node add form. Access granted!
Haven't had a chance to dig into this issue but it looks very much like a bug.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | bug-1144614-1.patch | 641 bytes | solipsist |
Comments
Comment #1
solipsist commentedI did some debugging. The cause of the error is the following line:
For a vocab with only one term, $total_terms will be assigned 0. That will trigger access denied further down:
I've attached a patch that fixes the problem.
Comment #2
deviantintegral commentedShould have looked at this issue first. I think this is fixed as a part of #1369522: Fix off-by-one error when users have access to only one term. Can you verify that works for you as well?