diff --git a/swad_ID.c b/swad_ID.c index ad96d940f..29b3286c8 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -439,7 +439,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat) case Rol_CTR_ADM: case Rol_INS_ADM: case Rol_SYS_ADM: - return Usr_AsAdminICanEditOtherUsr (UsrDat); + return Usr_ICanEditOtherUsr (UsrDat); default: return false; } @@ -519,7 +519,7 @@ void ID_ShowFormOthIDs (void) /***** Get user whose password must be changed *****/ if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) { - if (Usr_AsAdminICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat)) + if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat)) { /***** Start frame *****/ Lay_StartRoundFrame (NULL,Txt_ID,NULL,NULL); @@ -723,7 +723,7 @@ static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe) char UsrID[ID_MAX_LENGTH_USR_ID + 1]; bool ICanRemove; - if (Usr_AsAdminICanEditOtherUsr (UsrDat)) + if (Usr_ICanEditOtherUsr (UsrDat)) { /***** Get user's ID from form *****/ Par_GetParToText ("UsrID",UsrID,ID_MAX_LENGTH_USR_ID); @@ -844,7 +844,7 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) unsigned NumIDFound = 0; // Initialized to avoid warning bool Error = false; - if (Usr_AsAdminICanEditOtherUsr (UsrDat)) + if (Usr_ICanEditOtherUsr (UsrDat)) { /***** Get new user's ID from form *****/ Par_GetParToText ("NewID",NewID,ID_MAX_LENGTH_USR_ID); diff --git a/swad_account.c b/swad_account.c index 4896635e5..246311ea0 100644 --- a/swad_account.c +++ b/swad_account.c @@ -674,8 +674,6 @@ static bool Acc_GetParamsNewAccount (char NewNicknameWithoutArroba[Nck_MAX_BYTES /***** Step 3/3: Get new password from form *****/ Par_GetParToText ("Paswd",NewPlainPassword,Pwd_MAX_LENGTH_PLAIN_PASSWORD); - Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT, - NewPlainPassword,Pwd_MAX_LENGTH_PLAIN_PASSWORD,true); Cry_EncryptSHA512Base64 (NewPlainPassword,NewEncryptedPassword); if (!Pwd_SlowCheckIfPasswordIsGood (NewPlainPassword,NewEncryptedPassword,-1L)) // New password is good? { diff --git a/swad_changelog.h b/swad_changelog.h index 8a433133f..aa114c8d0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -191,13 +191,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.127.1 (2017-01-28)" +#define Log_PLATFORM_VERSION "SWAD 16.127.3 (2017-01-28)" #define CSS_FILE "swad16.123.css" #define JS_FILE "swad16.123.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.127.3: Jan 28, 2017 Fixed bug in permissions to change another user's data. (212127 lines) + Version 16.127.2: Jan 28, 2017 Fixed bug creating a new account. (212124 lines) Version 16.127.1: Jan 28, 2017 Fixed bug in listing of users. (212125 lines) Version 16.127: Jan 28, 2017 Code refactoring. (212118 lines) Version 16.126.6: Jan 27, 2017 Fixed bug related with list of students. (212098 lines) diff --git a/swad_enrollment.c b/swad_enrollment.c index 34ba3d1e0..9d8ed5c36 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -3154,7 +3154,7 @@ static void Enr_ShowFormToEditOtherUsr (void) /***** Buttons for edition *****/ fprintf (Gbl.F.Out,"