Hi,
I really, really like this module! Thank you for building this!

I saw when I typed in www.isnow.in/admin/domain/content/all that I still get the EDIT operation, also when I am not allowed to edit the content. What happens when I am not allowed to edit the content, I am redirect to a screen on which only the "3" is placed.
I saw that the permission is named: "edit domain nodes" to show the affilate content. May be this name is a little bit unclear, for me it was. Please see this as positive feedback.
But with this permission set, of course a site-owner should not be granted the edit functionality on other site-owners content.
This is taken care off I think, but the edit operation is still clickable. But goes to the "3" like I said.
Furthermore allready a great module!

Greetings,
Martijn

CommentFileSizeAuthor
#2 edit_example_lines.jpg31.98 KBsummit

Comments

agentrickard’s picture

I really did not understand this report.

Step-by-step explanation of the behavior (and what you expected) would be helpful. Screenshots also can help.

Remember that if you have 'administer nodes' permission or 'edit TYPE nodes' permission(s), then the access check will return TRUE.

If this is the case, you should see a warning message that says 'Your permissions allow you to see content...'

summit’s picture

StatusFileSize
new31.98 KB

Sorry for the fact this is not clear.
The main thing is I see a [EDIT] and can click on this, while I don't have the privalidge to edit the content of another user.
See attached picture. I am logged in as user martijn with permission:

Your privileges allow you to see content that may not be unique to this domain

I presume this is because of the permission

* edit domain nodes     CHECKED

But when I click on "Content for all affilaite sites and click on "edit" on content from another user I got the result as shown in the picture.

I think there should be a second permission. One for "view domain nodes" (of others without the "edit" operation shown), and one for "edit domain nodes" with the "edit" operation shown, but than off course fully working :)

I hope this bug-report is more clear for you. And sorry if I misinterpreted the functionality.
Greetings,
Martijn

agentrickard’s picture

Test one more thing for me:

Do you have the "Domain-based editing controls" set to "Use access control for editors"?

This setting is at 'admin/build/domain' -- the Domain Access settings page.

If this option is not checked, the edit permission is not stored in the node_access table, and would produce the error you report.

You might also turn on the 'Show debugging output on node view' while you are building the site. If you want to use domain-specific editing, for each node you should see an list of 'Editors' assigned to the node. If that is blank, it means that the domain-specific editor permissions are not being saved.

This problem you report is probably a user interface bug, not a functionality bug. I should probably disable the 'edit domain nodes' permission if the setting isn't turned on.

agentrickard’s picture

OK, I confirmed the problem that you report. The issue is that some nodes were created while 'Use access control for editors' was turned off.

This is covered in the documentation, but probably isn't clear.

----
2.4 Setting DOMAIN_EDITOR_RULE

This is an advanced instruction, and may be ignored.

At the top of the domain.module file, you will find this line:

define('DOMAIN_EDITOR_RULE', FALSE);

This setting controls the default behavior for affiliate editors. If
DOMAIN_INSTALL_RULE is set to FALSE, you may change this value to TRUE if you
intend to use editing controls.

If this is set to TRUE and DOMAIN_INSTALL_RULE is set to FALSE, all existing
nodes on your site will be editable by users who are assigned as editors of your
root domain.

See section 3 and section 5 for more information.

This means that if you have content _before_ you enable the Domain Access module and you wish to use domain-specific editing rules, you should set this value to TRUE _before_ enabling the module.

----
3.3 Advanced Usage

In the event that you wish to segregate which content certain editors can
control, you should not use the normal 'edit TYPE nodes' permission provided
by Drupal's core Node module. This permisson grants the ability for a user
to edit all nodes of a given type.

In the Domain Access model, this permission is not used in favor of the provided
'edit domain nodes' permission. This permission allows editors only to edit
(and delete) nodes that belong to their subdomain.

To enable this feature, you should grant the 'edit domain nodes' permission to
some roles. Then you should enable the 'Use access control for editors' setting
under the Domain Access configuration screen.

I think this is pretty clear.

There are also some advanced notes in section 5 of the README.

agentrickard’s picture

Status: Active » Reviewed & tested by the community

I think changing this function will remove the problem:

function domain_content_check($domain, $all) {
  global $user;
  $rule = variable_get('domain_editors', DOMAIN_EDITOR_RULE);
  $check = FALSE;
  $editor = FALSE;
  // Can this user see the default site?
  if ($rule && $domain['domain_id'] == 0 && $user->domain_user['-1'] == -1) {
    $editor = TRUE;
  }
  // Can this user see the active site?
  else if ($rule && $domain['domain_id'] > 0 && $domain['domain_id'] == $user->domain_user[$domain['domain_id']]) {
    $editor = TRUE;
  }
  if ($all || $editor) {
    $check = TRUE;
  }
  return $check;
}

I also made a change to the permissions for the module:

function domain_perm() {
  $rule = variable_get('domain_editors', DOMAIN_EDITOR_RULE);
  if ($rule) {
    return array('administer domains', 'set domain access', 'edit domain nodes');
  }
  else {
    return array('administer domains', 'set domain access');
  }  
}

These two changes should prevent this type of confusion.

Thanks for the bug report. This is beta after all, so we have to fix all these issues.

summit’s picture

Off course,
I am just trying to help. And will file bugreports with pictures to help you to understand.
Thanks for explaining and reparing!
greetings,
Martijn

agentrickard’s picture

Not a problem, I'm releasing early in order to get more testing done.

By the way, which part of the Netherlands are you from? Some of my ancestors came to the U.S. from Utrecht in 1625.

summit’s picture

I have just been in Utrecht today!
A great city with a spectacular Dom of Utrecht: http://nl.wikipedia.org/wiki/Dom_van_Utrecht
If you are ever in Holland, you have to visit "The Dom".

Greetings,
Martijn

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

We were in Holland in 2006, but it rained the whole time we were in Utrecht. We saw part of the Dom -- it was under repair -- but not much of the city.

summit’s picture

Status: Fixed » Closed (fixed)

It is raining now also here!
Yep thats the climate, we get used to it and know how to handle the rain.
thanks for fixing this!
greetings,
Martijn

agentrickard’s picture

Doesn't it rain every other hour in Holland? We were in:

- Maastricht
- Utrecht
- Rotterdam
- Den Haag
- Delft
- Amsterdam

It didn't rain in Maastricht, at least. (We loved Maastricht.)

summit’s picture

It is raining now! We have everywhere artificial grass, so when there is a little sunshine, you can play tennis, soccer etc..again.
That's why we are behind the computer, so often (to shelter for the rain :)
greetings,
Martijn