Provide the own user dashboard under '/dashboard/self'.
The own user dashboard is normally available under '/', but there is the idea to bind '/' to the screen which the user has configured as first menu entry in the 'My' menu [1]. In this case it is good to have the user dashboard still accessible under a different URL, e.g. the user wants to customize the 'My' menu and keep the user dashboard but not as the first menu entry. The user dashboard is actually also available under '/dashboard/<account-id>' which works for a single user but then couldn't be configured as default for all users. [1] https://gerrit-review.googlesource.com/55594 Change-Id: I9583a3edd56b687ab24162e03381e75dc99b2134 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
		@@ -440,6 +440,17 @@ public class Dispatcher {
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (rest.equals("self")) {
 | 
			
		||||
      if (Gerrit.isSignedIn()) {
 | 
			
		||||
        Gerrit.display(token, new AccountDashboardScreen(Gerrit.getUserAccount().getId()));
 | 
			
		||||
      } else {
 | 
			
		||||
        Screen s = new AccountDashboardScreen(null);
 | 
			
		||||
        s.setRequiresSignIn(true);
 | 
			
		||||
        Gerrit.display(token, s);
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (rest.startsWith("?")) {
 | 
			
		||||
      Gerrit.display(token, new CustomDashboardScreen(rest.substring(1)));
 | 
			
		||||
      return;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user