Enum in CamelCase
This commit is contained in:
		@ -44,17 +44,17 @@ public class ApplicationsController {
 | 
			
		||||
        Role posterRole = authServ.getUserFromToken(token).getRole();
 | 
			
		||||
        ArrayList<Applications> authorizedApps = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
        authorizedApps.add(Applications.LOGIN);
 | 
			
		||||
        authorizedApps.add(Applications.PROFILE);
 | 
			
		||||
        authorizedApps.add(Applications.MSG);
 | 
			
		||||
        authorizedApps.add(Applications.FORUM);
 | 
			
		||||
        authorizedApps.add(Applications.RDV);
 | 
			
		||||
        authorizedApps.add(Applications.Login);
 | 
			
		||||
        authorizedApps.add(Applications.Profile);
 | 
			
		||||
        authorizedApps.add(Applications.Msg);
 | 
			
		||||
        authorizedApps.add(Applications.Forum);
 | 
			
		||||
        authorizedApps.add(Applications.Rdv);
 | 
			
		||||
 | 
			
		||||
        if (posterRole == Role.Student || posterRole == Role.Admin) return authorizedApps;
 | 
			
		||||
 | 
			
		||||
        if (posterRole == Role.Teacher || posterRole == Role.Secretary || posterRole == Role.Admin) authorizedApps.add(Applications.MANAGECOURSES);
 | 
			
		||||
        if (posterRole == Role.Teacher || posterRole == Role.Secretary || posterRole == Role.Admin) authorizedApps.add(Applications.ManageCourses);
 | 
			
		||||
 | 
			
		||||
        if (posterRole == Role.InscriptionService || posterRole == Role.Admin) authorizedApps.add(Applications.INSCRIPTION);
 | 
			
		||||
        if (posterRole == Role.InscriptionService || posterRole == Role.Admin) authorizedApps.add(Applications.Inscription);
 | 
			
		||||
 | 
			
		||||
        return authorizedApps;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -2,23 +2,20 @@ package ovh.herisson.Clyde.Tables;
 | 
			
		||||
 | 
			
		||||
public enum Applications {
 | 
			
		||||
    // without any token
 | 
			
		||||
    LOGIN,
 | 
			
		||||
    Login,
 | 
			
		||||
 | 
			
		||||
    // with any token
 | 
			
		||||
    PROFILE,
 | 
			
		||||
    Profile,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // Students and higher authorization
 | 
			
		||||
    MSG,
 | 
			
		||||
    FORUM,
 | 
			
		||||
    RDV,
 | 
			
		||||
    Msg,
 | 
			
		||||
    Forum,
 | 
			
		||||
    Rdv,
 | 
			
		||||
 | 
			
		||||
    // teachers and Secretary authorization
 | 
			
		||||
    MANAGECOURSES,
 | 
			
		||||
    ManageCourses,
 | 
			
		||||
 | 
			
		||||
    // InscriptionService authorization
 | 
			
		||||
    INSCRIPTION;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Inscription
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package ovh.herisson.Clyde.Tables;
 | 
			
		||||
 | 
			
		||||
public enum CursusType {
 | 
			
		||||
 | 
			
		||||
    infoBab1,
 | 
			
		||||
    chemistryBab1,
 | 
			
		||||
    psychologyBab1;
 | 
			
		||||
    InfoBab1,
 | 
			
		||||
    ChemistryBab1,
 | 
			
		||||
    PsychologyBab1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -3,5 +3,5 @@ package ovh.herisson.Clyde.Tables;
 | 
			
		||||
public enum RequestState {
 | 
			
		||||
    Accepted,
 | 
			
		||||
    Refused,
 | 
			
		||||
    Pending;
 | 
			
		||||
    Pending
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -5,5 +5,5 @@ public enum Role {
 | 
			
		||||
    Student,
 | 
			
		||||
    Admin,
 | 
			
		||||
    InscriptionService,
 | 
			
		||||
    Secretary;
 | 
			
		||||
    Secretary
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user