So I have given teh "create web server" permission to the admin role, and I am admin, but I do not see the "create web server" menu in node/add.

Comments

anarcat’s picture

Note that I can create clients, platforms and sites, but not web or db servers. this is before server refactoring, probably an actual alpha3 install.

anarcat’s picture

Status: Active » Needs work

So I committed this ridiculous fix for web servers, but it doesn't work for db serevrs because there isn't a clear mapping between the node type (db_server) and the permission (database server) and i will *not* include a special case for that stupid content type.

It's ugly enough as it is:

--- a/modules/hosting/hosting.module
+++ b/modules/hosting/hosting.module
@@ -123,7 +123,7 @@ function hosting_menu_alter(&$items) {
   foreach ($types as $feature => $type) {
     $path = sprintf('node/add/%s', str_replace('_', '-', $type));
     $items[$path]['access callback'] = 'hosting_menu_access';
-    $items[$path]['access arguments'] = array($type, $feature);
+    $items[$path]['access arguments'] = array(str_replace('_', ' ', $type), $feature);
   }
   
   // These node types should remain hidden, and provide no user interface.

The above patch was committed, but the problem with db servers remains.

anarcat’s picture

Title: can't create webservers even if admin » can't create db servers even if admin
Anonymous’s picture

So, is this still a problem now that we only have a 'server' node type and a 'create server' permission?

adrian’s picture

Status: Needs work » Fixed

not relevant anymore.

Status: Fixed » Closed (fixed)

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

  • Commit 8d7abfc on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    #722512 - fix permissions on webserver creation
    

  • Commit 8d7abfc on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    #722512 - fix permissions on webserver creation