mirror of
https://github.com/gmemstr/pogo.git
synced 2024-09-19 17:21:10 +01:00
Added dropdowns for permission roles
This commit is contained in:
parent
fc292b497e
commit
d4361de8b9
|
@ -121,6 +121,13 @@ const useredit = {
|
|||
<input type="password" id="newpw2" name="newpw2">
|
||||
<label for="oldpw">Old Password</label>
|
||||
<input type="password" id="oldpw" name="oldpw">
|
||||
<br/><br/>
|
||||
<select name="permissions">
|
||||
<option value="0">Publishing only</option>
|
||||
<option value="1">Publishing and Episode Management</option>
|
||||
<option value="2">Publishing, Episode and User management</option>
|
||||
</select>
|
||||
|
||||
<input name="id" id="id" :value="user.id" type="hidden">
|
||||
<br /><br />
|
||||
<input type="submit" class="button" value="Save" class="button"></form>
|
||||
|
|
|
@ -98,7 +98,7 @@ hr {
|
|||
font-family: Monospace;
|
||||
}
|
||||
|
||||
input[type=text], input[type=date], input[type=file], input[type=password],textarea {
|
||||
input[type=text], input[type=date], input[type=file], input[type=password],textarea, select {
|
||||
padding:10px;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
|
|
|
@ -67,8 +67,9 @@ func Init() *mux.Router {
|
|||
rootHandler(),
|
||||
)).Methods("GET")
|
||||
|
||||
// Authenticated endpoints should be passed to BasicAuth()
|
||||
// first
|
||||
// RequireAuthorization() handles authentication
|
||||
// and takes a single argument for permission level.
|
||||
// 0 any user, 1 most users, 2 only admin users
|
||||
r.Handle("/admin", Handle(
|
||||
auth.RequireAuthorization(0),
|
||||
adminHandler(),
|
||||
|
|
Loading…
Reference in a new issue