diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php index a26f4f5f2..6e3b6c783 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php @@ -51,6 +51,12 @@ class Ticket_User{ } + public static function change_permission($user_id, $perm){ + $user = new Ticket_User(); + $user->load_With_TUserId($user_id); + $user->setPermission($perm); + $user->update(); + } ////////////////////////////////////////////Methods//////////////////////////////////////////////////// public function __construct() { diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php new file mode 100644 index 000000000..184b135d1 --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php @@ -0,0 +1,39 @@ +getPermission(); + if(Ticket_User::isAdmin($_SESSION['ticket_user'])){ + $result['isAdmin'] = "TRUE"; + } $ticketlist = Ticket::getTicketsOf($ticket_user->getTUserId()); $result['ticketlist'] = Gui_Elements::make_table($ticketlist, Array("getTId","getTimestamp","getTitle","getStatus","getStatusText","getStatusText","getCategoryName"), Array("tId","timestamp","title","status","statustext","statusText","category")); diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_user.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_user.tpl index 1780724d6..91bdc683f 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_user.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_user.tpl @@ -77,6 +77,20 @@