Menu system conform / propagation CanAdmin
This commit is contained in:
parent
ffff54ed1e
commit
9bbbfbe91a
5 changed files with 24 additions and 8 deletions
6
admin.go
6
admin.go
|
@ -43,6 +43,7 @@ type AdminUsersTplData struct {
|
||||||
UserNameAttr string
|
UserNameAttr string
|
||||||
UserBaseDN string
|
UserBaseDN string
|
||||||
Users EntryList
|
Users EntryList
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminActivateUsers(w http.ResponseWriter, r *http.Request) {
|
func handleAdminActivateUsers(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -153,6 +154,7 @@ type AdminGroupsTplData struct {
|
||||||
GroupNameAttr string
|
GroupNameAttr string
|
||||||
GroupBaseDN string
|
GroupBaseDN string
|
||||||
Groups EntryList
|
Groups EntryList
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminGroups(w http.ResponseWriter, r *http.Request) {
|
func handleAdminGroups(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -192,6 +194,7 @@ type AdminMailingTplData struct {
|
||||||
MailingNameAttr string
|
MailingNameAttr string
|
||||||
MailingBaseDN string
|
MailingBaseDN string
|
||||||
MailingLists EntryList
|
MailingLists EntryList
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminMailing(w http.ResponseWriter, r *http.Request) {
|
func handleAdminMailing(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -238,6 +241,7 @@ type AdminMailingListTplData struct {
|
||||||
|
|
||||||
Error string
|
Error string
|
||||||
Success bool
|
Success bool
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminMailingList(w http.ResponseWriter, r *http.Request) {
|
func handleAdminMailingList(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -453,6 +457,7 @@ type AdminLDAPTplData struct {
|
||||||
|
|
||||||
Error string
|
Error string
|
||||||
Success bool
|
Success bool
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type EntryName struct {
|
type EntryName struct {
|
||||||
|
@ -927,6 +932,7 @@ type CreateData struct {
|
||||||
SN string
|
SN string
|
||||||
|
|
||||||
Error string
|
Error string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminCreate(w http.ResponseWriter, r *http.Request) {
|
func handleAdminCreate(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
1
home.go
1
home.go
|
@ -10,6 +10,7 @@ type HomePageData struct {
|
||||||
Login *LoginStatus
|
Login *LoginStatus
|
||||||
BaseDN string
|
BaseDN string
|
||||||
Org string
|
Org string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleHome(w http.ResponseWriter, r *http.Request) {
|
func handleHome(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
@ -44,6 +44,7 @@ type PasswordFoundData struct {
|
||||||
Username string
|
Username string
|
||||||
Mail string
|
Mail string
|
||||||
OtherMailbox string
|
OtherMailbox string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type PasswordLostData struct {
|
type PasswordLostData struct {
|
||||||
|
@ -52,6 +53,7 @@ type PasswordLostData struct {
|
||||||
Username string
|
Username string
|
||||||
Mail string
|
Mail string
|
||||||
OtherMailbox string
|
OtherMailbox string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
|
func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
|
||||||
|
@ -204,6 +206,7 @@ type NewAccountData struct {
|
||||||
ErrorMessage string
|
ErrorMessage string
|
||||||
WarningMessage string
|
WarningMessage string
|
||||||
Success bool
|
Success bool
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invitedBy string) bool {
|
func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invitedBy string) bool {
|
||||||
|
@ -349,6 +352,7 @@ type SendCodeData struct {
|
||||||
CodeDisplay string
|
CodeDisplay string
|
||||||
CodeSentTo string
|
CodeSentTo string
|
||||||
WebBaseAddress string
|
WebBaseAddress string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type CodeMailFields struct {
|
type CodeMailFields struct {
|
||||||
|
@ -357,6 +361,7 @@ type CodeMailFields struct {
|
||||||
Code string
|
Code string
|
||||||
InviteFrom string
|
InviteFrom string
|
||||||
WebBaseAddress string
|
WebBaseAddress string
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleInviteSendCode(w http.ResponseWriter, r *http.Request) {
|
func handleInviteSendCode(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
1
login.go
1
login.go
|
@ -221,6 +221,7 @@ type LoginFormData struct {
|
||||||
WrongPass bool
|
WrongPass bool
|
||||||
ErrorMessage string
|
ErrorMessage string
|
||||||
Login bool
|
Login bool
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
|
func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
|
||||||
|
|
|
@ -20,6 +20,7 @@ type ProfileTplData struct {
|
||||||
Surname string
|
Surname string
|
||||||
Description string
|
Description string
|
||||||
Login *LoginStatus
|
Login *LoginStatus
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
//ProfilePicture string
|
//ProfilePicture string
|
||||||
|
@ -38,6 +39,7 @@ func handleProfile(w http.ResponseWriter, r *http.Request) {
|
||||||
Login: login,
|
Login: login,
|
||||||
ErrorMessage: "",
|
ErrorMessage: "",
|
||||||
Success: false,
|
Success: false,
|
||||||
|
CanAdmin: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Mail = login.UserEntry.GetAttributeValue("mail")
|
data.Mail = login.UserEntry.GetAttributeValue("mail")
|
||||||
|
@ -127,6 +129,7 @@ type PasswdTplData struct {
|
||||||
TooShortError bool
|
TooShortError bool
|
||||||
NoMatchError bool
|
NoMatchError bool
|
||||||
Success bool
|
Success bool
|
||||||
|
CanAdmin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
|
func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Reference in a new issue