File modules/cms/action/UserAction.class.php

Last commit: Wed Oct 27 02:27:59 2021 +0200	Jan Dankert	Refactoring: Splitted the mail client into a.) sendmail and b.) smtp.
1 <?php 2 3 namespace cms\action; 4 5 use cms\base\Configuration; 6 use cms\base\Startup; 7 use cms\model\Permission; 8 use cms\model\BaseObject; 9 use cms\model\Group; 10 use cms\model\Language; 11 use cms\model\Project; 12 use cms\model\User; 13 use language\Messages; 14 use security\Base2n; 15 use security\Password; 16 use util\exception\SecurityException; 17 use util\exception\ValidationException; 18 use util\mail\Mail; 19 use util\Session; 20 21 22 // OpenRat Content Management System 23 // Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de 24 // 25 // This program is free software; you can redistribute it and/or 26 // modify it under the terms of the GNU General Public License 27 // as published by the Free Software Foundation; either version 2 28 // of the License, or (at your option) any later version. 29 // 30 // This program is distributed in the hope that it will be useful, 31 // but WITHOUT ANY WARRANTY; without even the implied warranty of 32 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33 // GNU General Public License for more details. 34 // 35 // You should have received a copy of the GNU General Public License 36 // along with this program; if not, write to the Free Software 37 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 38 39 40 /** 41 * Action-Klasse zum Bearbeiten eines Benutzers 42 * @author $Author$ 43 * @version $Revision$ 44 * @package openrat.actions 45 */ 46 class UserAction extends BaseAction 47 { 48 /** 49 * @var User 50 */ 51 protected $user; 52 53 54 /** 55 * UserAction constructor. 56 * @throws \util\exception\ObjectNotFoundException 57 */ 58 function __construct() { 59 parent::__construct(); 60 } 61 62 63 public function init() { 64 $this->user = new User( $this->request->getId() ); 65 $this->user->load(); 66 $this->setTemplateVar('userid',$this->user->userid); 67 } 68 69 70 71 /** 72 * User must be an administration. 73 */ 74 public function checkAccess() { 75 if ( ! $this->userIsAdmin() ) 76 throw new SecurityException(); 77 } 78 79 }
Download modules/cms/action/UserAction.class.php
History Wed, 27 Oct 2021 02:27:59 +0200 Jan Dankert Refactoring: Splitted the mail client into a.) sendmail and b.) smtp. Sun, 14 Mar 2021 22:29:56 +0100 Jan Dankert Refactoring: Clearer access check. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Mon, 4 Jan 2021 19:03:18 +0100 Jan Dankert Refactoring: ACL class is renamed to Permission, because most RBAC/DMAC concepts are calling it a permission. Wed, 18 Nov 2020 00:18:10 +0100 Jan Dankert Refactoring Part 2: Removing all unnecessary methods in the action base classes. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class. Sun, 1 Nov 2020 22:27:37 +0100 Jan Dankert Refactoring: The active menu entrys are now controlled by the action class; The user switch function is now available as a menu entry. Sun, 1 Nov 2020 20:29:38 +0100 Jan Dankert Fix: Password change only possible for internal users. Sun, 1 Nov 2020 03:08:55 +0100 Jan Dankert Replaced the calls to "Configuration::rawConfig()" with the OO style calls; Cleanup LoginAction. Sun, 1 Nov 2020 00:36:50 +0100 Jan Dankert Refactoring: Only using the configuration object. Sat, 31 Oct 2020 00:43:29 +0100 Jan Dankert New: Support for OpenId Connect; Removed: Support for LDAP. Sun, 25 Oct 2020 02:51:56 +0200 Jan Dankert Using the object-based configuration. Sun, 25 Oct 2020 02:11:58 +0200 Jan Dankert Fix: The config was not read in the templates :-O. Fri, 2 Oct 2020 23:11:48 +0200 Jan Dankert Cleanup: No '.inputholder' any more, notices with links to objects. Tue, 29 Sep 2020 22:17:11 +0200 Jan Dankert Refactoring: Do not use global constants. Sat, 26 Sep 2020 10:32:02 +0200 Jan Dankert Refactoring: No global $conf array any more. Sat, 26 Sep 2020 04:26:55 +0200 Jan Dankert Refactoring: read configuration values with a class. Sat, 26 Sep 2020 04:03:53 +0200 Jan Dankert Refactoring: read language keys with a class. Thu, 10 Sep 2020 18:30:16 +0200 Jan Dankert Some code cleanup, killing the old "checkMenu()"-methods. Sun, 23 Feb 2020 04:01:30 +0100 Jan Dankert Refactoring with Namespaces for the cms modules, part 1: moving.