diff --git a/app/controllers/admin/GroupsController.php b/app/controllers/admin/GroupsController.php index 9a876b17e1..eb394c67ef 100755 --- a/app/controllers/admin/GroupsController.php +++ b/app/controllers/admin/GroupsController.php @@ -163,7 +163,7 @@ class GroupsController extends AdminController if (!Config::get('app.lock_passwords')) { - try { + try { // Update the group data $group->name = Input::get('name'); $group->permissions = Input::get('permissions'); @@ -196,18 +196,22 @@ class GroupsController extends AdminController */ public function getDelete($id = null) { - try { - // Get group information - $group = Sentry::getGroupProvider()->findById($id); + if (!Config::get('app.lock_passwords')) { + try { + // Get group information + $group = Sentry::getGroupProvider()->findById($id); - // Delete the group - $group->delete(); + // Delete the group + $group->delete(); - // Redirect to the group management page - return Redirect::route('groups')->with('success', Lang::get('admin/groups/message.success.delete')); - } catch (GroupNotFoundException $e) { - // Redirect to the group management page - return Redirect::route('groups')->with('error', Lang::get('admin/groups/message.group_not_found', compact('id'))); + // Redirect to the group management page + return Redirect::route('groups')->with('success', Lang::get('admin/groups/message.success.delete')); + } catch (GroupNotFoundException $e) { + // Redirect to the group management page + return Redirect::route('groups')->with('error', Lang::get('admin/groups/message.group_not_found', compact('id'))); + } + } else { + return Redirect::route('groups')->with('error', Lang::get('general.feature_disabled')); } } diff --git a/app/views/backend/groups/index.blade.php b/app/views/backend/groups/index.blade.php index ca171fdfb3..c55f4a6d68 100755 --- a/app/views/backend/groups/index.blade.php +++ b/app/views/backend/groups/index.blade.php @@ -37,8 +37,8 @@