yuhuitao 2 yıl önce
ebeveyn
işleme
3e0dabb99c

+ 8 - 0
modules/sso/src/main/java/com/jeesite/modules/sso/web/SsoAppController.java

@@ -3,8 +3,11 @@ package com.jeesite.modules.sso.web;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.jeesite.modules.sys.entity.Role;
+import com.jeesite.modules.sys.service.RoleService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.validation.annotation.Validated;
@@ -36,6 +39,8 @@ public class SsoAppController extends BaseController {
 
 	@Autowired
 	private SsoAppService ssoAppService;
+	@Autowired
+	private RoleService roleService;
 
 	/**
 	 * 获取数据
@@ -109,6 +114,9 @@ public class SsoAppController extends BaseController {
 	@RequestMapping(value = "form")
 	public String form(SsoApp ssoApp, Model model) {
 		model.addAttribute("ssoApp", ssoApp);
+		//查询权限列表
+		List<Role> rolelist = roleService.findList(new Role());
+		model.addAttribute("approles", rolelist);
 		return "modules/sso/ssoAppForm";
 	}
 

+ 7 - 1
modules/sso/src/main/resources/views/modules/sso/ssoAppForm.html

@@ -104,7 +104,13 @@
 							<label class="control-label col-sm-4" title="">
 								<span class="required hide">*</span> ${text('权限')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-8">
-								<#form:checkbox path="authority" dictType="sys_role_type" class="form-control" />
+								<!--<#form:checkbox path="authority" dictType="sys_role_type" class="form-control" />-->
+
+
+								<#html:foreach items="${approles}" var="role" >
+									<input type="checkbox" name="authority" value="${role.roleCode}">${role.roleName}
+								</#html:foreach>
+
 							</div>
 						</div>
 					</div>