I have no idea why this has happenned. When logged in as user 1, we go to node/add/platform and it gives us an access denied.

I am running the Debian packages from Koumbit. Oddly enough, with no upgrades or changes at all in between, I have lost the ability to create a platform. This happenned from one day to the next.

I really wish I had some detailed information to offer by way of an explanation. I will update if or when I do.

Comments

sfyn’s picture

I should add that I can still edit existing platforms...

sfyn’s picture

I tried this:

/**
 * Implementation of hook_access()
 */
function hosting_platform_access($op, $node, $account) {
  switch ($op) {
    case 'create':
      //return user_access('create platform', $account);
      return TRUE;
      break;
    case 'update':
      return user_access('edit platform', $account);
      break;
  }
}

With no success.

sfyn’s picture

node_access is returning TRUE for node/add/platform

No idea where to go from here...

sfyn’s picture

I also tried creating a different user with the right permissions - same problem...

anarcat’s picture

Priority: Normal » Major
Issue tags: +aegirWTF

If this is reproduced, it seems like a major WTF that should be addressed ASAP.

There was some refactoring of the permission code in the later stages of the RC cycle. In particular, it may be that #1096498: Managers should have access to all sites, tasks and clients, fixed in rc3, broke this.

Can you try rc2 to see if you can reproduce?

Have you tried rebuilding the node access table (which we know doesn't affect platforms normally, but hey... ;)?

Any way we can reproduce this reliably?

sfyn’s picture

For the sake of completeness I have attempted a rebuild of node permissions. I will try rc2 later this week.

omega8cc’s picture

Category: bug » support

Unless there are steps to reproduce, it is not a bug, rather support request related to some broken Aegir instance probably.

I have never seen that issue before on any Aegir version.

Anyway, it works for me on any server we recently upgraded to Aegir 1.0 stable, without any issues.

sfyn’s picture

Yeah, definitely a support request. Still no progress resolving this.

sfyn’s picture

Status: Active » Closed (cannot reproduce)

OK, not only can I not provide instructions to reproduce this bug, but it appears to have gone away on its own...

I suspect some kind of obscure caching issue, but I am honestly not sure...

praestigiare’s picture

I have this same issue with an install of Aegir 1.3. I have tried everything I can think of.

praestigiare’s picture

Status: Closed (cannot reproduce) » Active
steven jones’s picture

Version: 6.x-0.4-alpha3 » 6.x-1.3
Status: Active » Postponed (maintainer needs more info)

As this thread has kind of eluded to this issue is really hard to reproduce, so we're not going to be able to say: "Hey all you need to do it tick this box on this form and get everything working again" unfortunately. You will need some PHP skills if you want to get to the bottom of your issue...

You may have a genuine issue of something very strange happening, which we'd like to get to the bottom of, but it's not going to be terribly easy. Possibly the only real way to work out exactly what is going on is to set up xdebug on you Aegir server, and step through the page request until you spot where the access denied happens. You can probably start from the node/add page callback, and go from there. There are lots of tutorials out there which take you through setting up xdebug and integrating it with and IDE.

Apologies that that's not terribly useful, but I'm not sure there's much we can do until someone who encounters this error tracks it down. Good luck!

anarcat’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
jason.fisher’s picture

Version: 6.x-1.3 » 6.x-1.4

Not re-opening, but bumping the version because I am seeing this on 6.x-1.4. Will update with my resolution.

jason.fisher’s picture

Status: Closed (cannot reproduce) » Needs work

In my case, it was caused by the contrib module hosting_profile_roles. I placed this module into my hostmaster's sites/mysite/modules directory and rebuilt the menus and immediately get access_denied on node/add/platform.

This is the function I trapped the error in. For some reason, print $feature will return "hosting_profile" if the hosting_profile_roles module simply exists in that directory. It does not need to be enabled.

<?
/**
* Menu access callback for creating a node provided by a Hosting feature.
*
* @param $type
* The node type that the user wants to create.
* @param $feature
* The machine name of the host feature that should be additionally checked to
* see if it's enabled.
* @return
* TRUE if the user can access, FALSE otherwise.
*/
function hosting_menu_access($type, $feature) {

global $user;
print $feature;
return (($user->uid == 1) || user_access('create ' . $type)) && (hosting_feature($feature) != HOSTING_FEATURE_DISABLED);
}

?>

I have posted an issue to hosting_profile_roles: http://drupal.org/node/1401552

I will not have time to dig into this further as I do not need that module .. but hopefully this information helps.

Re-opening the issue for a couple of weeks to see if we can get confirmation from the ticket opener or someone else with the same symptom.

steven jones’s picture

Status: Needs work » Postponed (maintainer needs more info)

Setting to the correct status.

jason.fisher’s picture

hosting_profile_roles released a fix that is likely related to the original issue here.

http://drupal.org/node/1401552

ergonlogic’s picture

Status: Postponed (maintainer needs more info) » Fixed
Issue tags: -aegirWTF

As noted above, this was an issue with Hosting Profile Roles, since fixed. This was due to declaring a 'node' type in the Hosting feature.

I've tried replicating this in Aegir 2, but it doesn't seem to cause the same problems anymore. I'm marking as fixed, but feel free to re-open should this remain a problem.

Status: Fixed » Closed (fixed)

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