diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 2578cdf7a..073e274cc 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -36,6 +36,7 @@ add_to_group_success = "The user has been added to the group!" user_already_added = "The user is already part of the group!" group_not_existing = "The group doesn't exist!" user_not_existing = "The user doesn't seem to exist" +not_mod_or_admin = "You can only add Moderators or Admins!" [sgroup_list] group_success = "The group has been created!" diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index a62cc8004..81d234233 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -36,6 +36,7 @@ add_to_group_success = "ce user est ajoute sur la groupe!" user_already_added = "cet user est deja membre de la groupe!" group_not_existing = "cet Groupe n' existe pas!" user_not_existing = "cet user n'existe pas" +not_mod_or_admin = "C'est possible d'ajoute seulement des mods et admins!" [sgroup_list] group_success = "le group est cree!" diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php index cd6a4b0bb..3eb79b928 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php @@ -9,7 +9,12 @@ function add_user_to_sgroup(){ $id = filter_var($_POST['target_id'],FILTER_SANITIZE_NUMBER_INT); $user_id = WebUsers::getId($name); if ($user_id != ""){ - $result['RESULT_OF_ADDING'] = Support_Group::addUserToSupportGroup($user_id, $id); + if (Ticket_User::constr_ExternId($user_id)->getPermission()>1){ + $result['RESULT_OF_ADDING'] = Support_Group::addUserToSupportGroup($user_id, $id); + }else{ + $result['RESULT_OF_ADDING'] = "NOT_MOD_OR_ADMIN"; + } + }else{ $result['RESULT_OF_ADDING'] = "USER_NOT_EXISTING"; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png b/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png index c5e8da651..1125a5720 100644 Binary files a/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png and b/code/ryzom/tools/server/ryzom_ams/www/html/sql/DBScheme.png differ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php b/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php index 33277fdb8..36c2c7406 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php @@ -186,6 +186,7 @@ `Author` INT UNSIGNED NOT NULL , `Content` INT UNSIGNED NOT NULL , `Timestamp` TIMESTAMP NULL , + `Hidden` TINYINT(1) NULL DEFAULT 0 , PRIMARY KEY (`TReplyId`) , INDEX `fk_ticket_reply_ticket_idx` (`Ticket` ASC) , INDEX `fk_ticket_reply_ams_user_idx` (`Author` ASC) , diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql index 137a823c3..cbfabf301 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql +++ b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsql.sql @@ -145,6 +145,7 @@ CREATE TABLE IF NOT EXISTS `mydb`.`ticket_reply` ( `Author` INT UNSIGNED NOT NULL , `Content` INT UNSIGNED NOT NULL , `Timestamp` TIMESTAMP NULL , + `Hidden` TINYINT(1) NULL DEFAULT 0 , PRIMARY KEY (`TReplyId`) , INDEX `fk_ticket_reply_ticket_idx` (`Ticket` ASC) , INDEX `fk_ticket_reply_ams_user_idx` (`Author` ASC) , diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb index a605c7a19..d3e0aec36 100644 Binary files a/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb and b/code/ryzom/tools/server/ryzom_ams/www/html/sql/ticketsystemmodel.mwb differ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl index 6ed551bfc..9201ca535 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_sgroup.tpl @@ -86,6 +86,10 @@
{$user_not_existing}
+ {else if isset($RESULT_OF_ADDING) and $RESULT_OF_ADDING eq "NOT_MOD_OR_ADMIN"} +
+ {$not_mod_or_admin} +
{/if}