You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client/hosting_client.module
+88Lines changed: 88 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,10 @@ function hosting_client_permission() {
88
88
'edit client uname' => array(
89
89
'title' => t('edit client uname'),
90
90
),
91
+
'bypass domain owner check' => array(
92
+
'title' => t('bypass domain owner check'),
93
+
'description' => t('Allows the client to register a subdomain, even when the above domain is owned by another client.'),
94
+
),
91
95
);
92
96
}
93
97
@@ -991,6 +995,12 @@ function hosting_client_configure($form, &$form_state) {
991
995
'#description' => t('If this setting is on, any new client nodes will automatically have a system user account generated for them, and associated with the new client node. Users going through the signup form module have a user created regardless of this setting.'),
'#title' => t('Check owner upon creating subdomains.'),
1001
+
'#description' => t("As a policy a hosting_client user is not allowed to create a site on a domain or subdomain thereof that is already in use by another client. (Unles the client has the 'bypass domain owner check' permission)"),
Copy file name to clipboardExpand all lines: site/hosting_site.form.inc
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -403,8 +403,9 @@ function hosting_site_validate($node, &$form) {
403
403
}
404
404
405
405
// TODO: maybe we should allow creation of sites that conflict with HOSTING_SITE_DISABLED (which would then need to be renamed before being re-enabled)
406
+
// TODO: This error is also triggered when the user attempts to register a subdomain of a used site. Perhaps we should read the error code and split the errors?
406
407
if (!hosting_domain_allowed($url, (array) $node)) {
407
-
form_set_error('title', t("The domain name you have specified is already in use."));
408
+
form_set_error('title', t("The domain name you have specified is already in use, or does not belong to you."));
408
409
}
409
410
410
411
// If the quota module is loaded and this is a new node, check
0 commit comments