SAAS-178: Demo instance should prevent changing of admin password
- Error msg is returned when try to update admin account
This commit is contained in:
parent
438340ff9a
commit
2027db3609
|
@ -19,6 +19,8 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
public function addUserAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
|
@ -33,7 +35,10 @@ class UserController extends Zend_Controller_Action
|
|||
if ($form->isValid($request->getPost())) {
|
||||
|
||||
$formdata = $form->getValues();
|
||||
if ($form->validateLogin($formdata)){
|
||||
if(isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1 && $formdata['login'] == 'admin' && $formdata['user_id'] != 0){
|
||||
$this->view->successMessage = "<div class='errors'>Specific action is not allowed in demo version!</div>";
|
||||
}
|
||||
else if ($form->validateLogin($formdata)){
|
||||
$user = new Application_Model_User($formdata['user_id']);
|
||||
$user->setFirstName($formdata['first_name']);
|
||||
$user->setLastName($formdata['last_name']);
|
||||
|
|
|
@ -1338,6 +1338,15 @@ div.success{
|
|||
border:1px solid #488214;
|
||||
}
|
||||
|
||||
div.errors{
|
||||
color:#902d2d;
|
||||
font-size:11px;
|
||||
padding:2px 4px;
|
||||
background:#c6b4b4;
|
||||
margin-bottom:2px;
|
||||
border:1px solid #c83f3f;
|
||||
}
|
||||
|
||||
.collapsible-header, .collapsible-header-disabled {
|
||||
border: 1px solid #8f8f8f;
|
||||
background-color: #cccccc;
|
||||
|
|
Loading…
Reference in New Issue