Force node access rules on admins

agentrickard - October 26, 2009 - 21:27
Project:Domain Access
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:closed
Description

I just thought of how to accomplish this today, and wonder if we should bother.

We could have an advanced setting that says "Force node access rules on admins" and, if set, we would run db_rewrite_sql() for user 1 and users with 'administer nodes' (only).

Thoughts?

#1

agentrickard - October 27, 2009 - 13:48
Priority:normal» critical

Here's a patch. I think this will lessen support requests considerably.

AttachmentSize
615294-enforce.patch 2.45 KB

#2

agentrickard - October 27, 2009 - 21:19

Better patch.

AttachmentSize
615294-enforce.patch 2.52 KB

#3

voxpelli - October 29, 2009 - 07:35

Seems like a good idea - can sometimes be confusing for the admins today when it's not enforced

#4

agentrickard - October 29, 2009 - 15:06

The only issue is that I am only enforcing DA rules, so if you have two access control modules, it isn't perfect.

#5

skizzo - October 30, 2009 - 19:23

is the patch designed for 6.x-2.x-dev only? It appears to apply against my 6.x-2.0-rc9 installation (no other access control module), but then user 1 can still access any node from any domain... I think that an advanced setting option would be useful, as under some circumstances the current behaviour might be desirable (e.g.: monitoring activities across domains).

[domain]# patch < 615294-enforce_0.patch         
patching file domain.admin.inc                                 
patching file domain.module                                    
Hunk #1 succeeded at 2086 (offset -172 lines).

#6

agentrickard - October 30, 2009 - 20:36

It should work for user 1. There is a configuration option you have to toggle.

The setting is right under 'debug mode' in the form.

#7

skizzo - October 30, 2009 - 22:20

Got it, and it's working fine for me. I guess that for new installations the setting would default to "Restrict node views for administrator", so to reduce support request.

#8

agentrickard - October 31, 2009 - 14:56

No, it defaults to FALSE, since this alters core behavior. The documentation will indicate how to enable it.

#9

agentrickard - October 31, 2009 - 18:30
Status:needs review» patch (to be ported)

Committed to HEAD.

#10

agentrickard - October 31, 2009 - 18:51

D5 version.

AttachmentSize
615294-enforce-d5.patch 2.54 KB

#11

agentrickard - October 31, 2009 - 19:12
Status:patch (to be ported)» fixed

Committed to D5.

#12

System Message - November 14, 2009 - 19:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.