사용자 등록시 권한 부여

This commit is contained in:
현성필
2023-05-16 11:40:50 +09:00
parent 0197f3c7d8
commit e8e435b6fd
14 changed files with 43 additions and 97 deletions
@@ -19,7 +19,7 @@
<a class="nav-link" href="/mgmt/routes/list_view.do">응답 관리</a>
</li>
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" href="/mgmt/api_tester.do">Tester</a>
<a class="nav-link" href="/mgmt/api_tester.do">테스터</a>
</li>
<li class="nav-item dropdown" sec:authorize="hasRole('ROLE_ADMIN')">
<a class="nav-link dropdown-toggle" href="#" id="mgmtDropDown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
@@ -27,7 +27,7 @@
</a>
<ul class="dropdown-menu" aria-labelledby="mgmtDropDown">
<li><a class="dropdown-item" href="/mgmt/users/list_view.do">사용자 관리</a></li>
<li><a class="dropdown-item" href="/mgmt/groups/list_view.do">그룹 관리</a></li>
<!-- <li><a class="dropdown-item" href="/mgmt/groups/list_view.do">그룹 관리</a></li>-->
<li><a class="dropdown-item" href="/mgmt/servers/list_view.do">서버 관리</a></li>
</ul>
</li>
@@ -47,6 +47,14 @@
</th:block>
</div>
<div class="form-floating mt-2">
<select class="form-select" th:field="*{userSecurity}">
<option th:selected="${user.userSecurity!= null && user.userSecurity == 'ROLE_ADMIN'}" value="ROLE_ADMIN">관리자</option>
<option th:selected="${user.userSecurity!= null && user.userSecurity == 'ROLE_USER'}" value="ROLE_USER">사용자</option>
</select>
<label class="form-label must">권한</label>
</div>
<div class="form-floating mt-2">
<input type="text" class="form-control" th:classappend="${#fields.hasErrors('mobilePhone')}? 'is-invalid'" th:field="*{mobilePhone}" name="mobilePhone" id="mobilePhone" required/>
<label for="mobilePhone" class="form-label must" th:text="#{mobilePhone}">연락처</label>