API CHANGE Security::permissionFailure(); will no longer tell the client side JS to show the login box if the user is already logged in

ENHANCEMENT added canAddTopLevel permission to SiteConfig to determine which users/groups can add pages to the root of the sitetree. (from r87279)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98159 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:39:58 +00:00
parent 7a1e8591c8
commit ecbd5f89c0

View File

@ -132,17 +132,15 @@ addpageclass.prototype = {
var suffix = _NEW_PAGES[parentID]++;
Ajax.SubmitForm(_HANDLER_FORMS.addpage, "action_addpage", {
onSuccess : Ajax.Evaluator,
onFailure : this.showAddPageError,
onFailure : function(response) { if (response.status == 403) {
alert('You cannot add that page at that location.');
}},
extraData: '&Suffix=' + suffix
});
}
return false;
},
showAddPageError: function(response) {
errorMessage(ss.i18n._t('CMSMAIN.ERRORADDINGPAGE'), response);
}
};
/**