You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/08/17 16:18:39 UTC

[GitHub] [rocketmq-dashboard] StyleTang commented on a change in pull request #7: [ISSUE #5]Different pages are displayed based on the user role.

StyleTang commented on a change in pull request #7:
URL: https://github.com/apache/rocketmq-dashboard/pull/7#discussion_r690492743



##########
File path: src/main/resources/static/src/ops.js
##########
@@ -15,10 +15,12 @@
  * limitations under the License.
  */
 
-app.controller('opsController', ['$scope','$location','$http','Notification','remoteApi','tools', function ($scope,$location,$http,Notification,remoteApi,tools) {
+app.controller('opsController', ['$scope', '$location', '$http', 'Notification', 'remoteApi', 'tools', '$window', function ($scope, $location, $http, Notification, remoteApi, tools, $window) {
     $scope.namesvrAddrList = "";
     $scope.useVIPChannel = true;
     $scope.useTLS = false;
+    $scope.userRole = $window.sessionStorage.getItem("userrole");
+    ;

Review comment:
       remove unnecessary ;

##########
File path: src/main/java/org/apache/rocketmq/dashboard/controller/LoginController.java
##########
@@ -65,10 +66,10 @@ public Object check(HttpServletRequest request) {
 
     @RequestMapping(value = "/login.do", method = RequestMethod.POST)
     @ResponseBody
-    public JsonResult<String> login(@RequestParam("username") String username,
-                            @RequestParam(value = "password") String password,
-                            HttpServletRequest request,
-                            HttpServletResponse response) throws Exception {
+    public Object login(@RequestParam("username") String username,

Review comment:
       Use LoginResult instead of Object




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org