diff --git a/client/pages/adminpage.scss b/client/pages/adminpage.scss index fd11295b..f6c244b5 100644 --- a/client/pages/adminpage.scss +++ b/client/pages/adminpage.scss @@ -103,6 +103,10 @@ background: rgba(0,0,0,0.05); border-bottom: 0; border-radius: 3px; padding-left: 5px; + &[readonly]{ + background: var(--dark); + color: var(--light); + } } } } diff --git a/client/pages/adminpage/backend.js b/client/pages/adminpage/backend.js index 775ff3a2..b99dd47f 100644 --- a/client/pages/adminpage/backend.js +++ b/client/pages/adminpage/backend.js @@ -214,7 +214,16 @@ export class BackendPage extends React.Component {
{ - struct.description ? (
{struct.description}
) : null + struct.description ? ( +
$1") + .replaceAll("\n", "
"); + }() + }}>
+ ) : null }
diff --git a/server/plugin/plg_authenticate_admin/index.go b/server/plugin/plg_authenticate_admin/index.go index bb5de298..bb0be76d 100644 --- a/server/plugin/plg_authenticate_admin/index.go +++ b/server/plugin/plg_authenticate_admin/index.go @@ -22,10 +22,13 @@ func (this Admin) Setup() Form { Value: "admin", }, { - Name: "hint", + Name: "password", Type: "text", ReadOnly: true, - Value: "You will be ask for your Filestash admin password", + Value: Config.Get("auth.admin").String(), + Description: `This plugin will redirect the user to a page asking for a password. Only the admin password will be considered valid. +This plugin exposes {{ .user }} (which is 'admin') and {{ .password }} for the attribute mapping section +`, }, }, } @@ -42,15 +45,18 @@ func (this Admin) EntryPoint(idpParams map[string]string, req *http.Request, res MaxAge: -1, Path: "/", }) - return fmt.Sprintf("%s", c.Value) + return fmt.Sprintf(`

%s

`, c.Value) } res.Header().Set("Content-Type", "text/html; charset=utf-8") res.WriteHeader(http.StatusOK) res.Write([]byte(Page(`
-