Browse Source

权限控制 加强

wangdy 8 years ago
parent
commit
5011cbe757

+ 5 - 1
src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java

@@ -174,7 +174,7 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
 			}
 		}
 		if (needPermission != null){
-			throw new AccessDeniedException("无法访问,没有 " + needPermission + " 权限!");
+			throw new AccessDeniedException("您没有 " + needPermission + " 的权限,请与管理员联系!");
 		}
 	}
 
@@ -245,6 +245,10 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
 					}
 				}
 			}
+
+		}
+		if (user.getUserUU().equals(user.getEnterprise().getEnAdminuu())){
+			user.setIssys(Constant.YES);
 		}
 		if (authorities == null) {
 			authorities = new HashMap<Long, Collection<GrantedAuthority>>();

+ 5 - 0
src/main/java/com/uas/platform/b2c/external/erp/order/service/impl/OrderServiceImpl.java

@@ -123,4 +123,9 @@ public class OrderServiceImpl implements OrderService {
 		}
 		return true;
 	}
+
+	@Override
+	public Long findAdminuu() {
+		return null;
+	}
 }

+ 0 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -3,7 +3,6 @@ package com.uas.platform.b2c.trade.order.service.impl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.sun.org.apache.xpath.internal.operations.Bool;
 import com.uas.api.b2c_erp.buyer.model.B2cOrder;
 import com.uas.api.exception.B2CException;
 import com.uas.platform.b2c.common.account.dao.EnterpriseDao;

+ 6 - 6
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_cart_ctrl.js

@@ -885,7 +885,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
                 $scope.calculateAmount($scope.selectedStoreCarts);
 
             }, function (res) {
-                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+                toaster.pop('error', '系统错误', res.data);
             });
 
 
@@ -899,7 +899,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
                         $scope.collectDelete(id);
                         toaster.pop('success', '收藏成功');
                     }, function(response) {
-                        toaster.pop('error', '收藏失败');
+                        toaster.pop('error', response.data);
                     })
                 });
 			}else{
@@ -920,8 +920,8 @@ define(["app/app", 'jquery-summernote'], function(app) {
                         $scope.collectDelete();
                         toaster.pop('success', '收藏成功');
 					}
-				},function () {
-                    toaster.pop('error', '收藏失败');
+				},function (response) {
+                    toaster.pop('error', response.data);
                 })
 			}
 		}
@@ -978,7 +978,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
                 toaster.pop('success', '成功删除');
                 $modalInstance.close()
             }, function (res) {
-                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+                toaster.pop('error', '系统错误', res.data);
             });
         };
 
@@ -987,7 +987,7 @@ define(["app/app", 'jquery-summernote'], function(app) {
                 toaster.pop('success', '成功清除购物车内的无效产品');
                 $modalInstance.close()
             }, function (res) {
-                toaster.pop('error', '系统错误', '购物车信息删除失败' + res.data);
+                toaster.pop('error', '系统错误', res.data);
             });
         };
 

+ 8 - 8
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -536,8 +536,8 @@
             <ul class="fl">
                 <li ng-class="{'active': tab=='base'}"><a ng-click="checkTab('base')">基本信息</a></li>
                 <li ng-class="{'active': tab=='safe'}"><a ng-click="checkTab('safe')">安全设置</a></li>
-                <li ng-class="{'active': tab=='auth'}"><a ng-click="checkTab('auth')">人员信息</a></li>
-                <li ng-class="{'active': tab=='role'}"><a ng-click="checkTab('role')">角色管理</a></li>
+                <li ng-class="{'active': tab=='auth'}"><a ng-click="checkTab('auth')">员工管理</a></li>
+                <li ng-class="{'active': tab=='role'}"><a ng-click="checkTab('role')">角色权限</a></li>
                 <!--<li ng-class="{'active': tab=='logistic'}"><a href="#" ng-click="checkTab('logistic')">收货地址</a></li>-->
             </ul>
         </div>
@@ -829,12 +829,12 @@
                     <table class="role-info" ng-table="tableParams">
                         <thead>
                         <tr>
-                            <th width="64">
+                           <!-- <th width="64">
                                 <lable class="check-act">
                                     <input type="checkbox" id="checkAll" ng-checked="isCheckAll" ng-click="doCheckAll()"/>
                                     <label for="checkAll"></label>
                                 </lable>
-                                全选</th>
+                                全选</th>-->
                             <th width="134">UU账号</th>
                             <th width="92">姓名</th>
                             <th width="58">性别</th>
@@ -846,12 +846,12 @@
                         </thead>
                         <tbody>
                         <tr class="role-filter" ng-show="addingUser">
-                            <td>
+                            <!--<td>
                                 <lable class="check-act">
                                     <input type="checkbox" id="check0"/>
                                     <label for="check0"></label>
                                 </lable>
-                            </td>
+                            </td>-->
                             <td>系统生成</td>
                             <td>
                                 <input type="text" ng-model="newUser.userName" required placeholder="用户名">
@@ -882,12 +882,12 @@
                             </td>
                         </tr>
                         <tr ng-repeat="user in users track by $index">
-                            <td>
+                           <!-- <td>
                                 <lable class="check-act">
                                     <input type="checkbox" id="{{'check1'+$index+1}}" ng-checked="user.checked" ng-click="checkUser(user)"/>
                                     <label for="{{'check1'+$index+1}}"></label>
                                 </lable>
-                            </td>
+                            </td>-->
                             <td>{{user.userUU}}</td>
                             <td>{{user.userName}}</td>
                             <td>{{user.userSex == 'M'?'男':'女'}}</td>