18
18
< div class ="sectionTitleContainer flex align-items-center ">
19
19
< h2 class ="sectionTitle "> Authelia Settings:</ h2 >
20
20
</ div >
21
- < p > < i > Note:</ i > Making changes to this configuration requires a restart of Jellyfin.</ p >
21
+ < p > < i > Note:</ i > Making changes to this configuration does not require restarting Jellyfin.</ p >
22
22
< div
23
23
class ="verticalSection "
24
24
title ="Authelia Settings "
@@ -27,7 +27,7 @@ <h2 class="sectionTitle">Authelia Settings:</h2>
27
27
< input
28
28
is ="emby-input "
29
29
type ="text "
30
- id ="txtAutheliaServer "
30
+ id ="AutheliaServer "
31
31
required
32
32
placeholder ="authelia "
33
33
label ="Authelia Server: "
@@ -41,22 +41,19 @@ <h2 class="sectionTitle">Authelia Settings:</h2>
41
41
is ="emby-textarea "
42
42
class ="emby-textarea "
43
43
type ="text "
44
- id ="txtAutheliaRootCa "
44
+ id ="AutheliaRootCa "
45
45
placeholder ="-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE----- "
46
46
rows ="3 "
47
47
> </ textarea >
48
48
</ label >
49
- < div class ="fieldDescription ">
50
- < div > The root CA for the Authelia server you wish to use for Authentication.</ div >
51
- < div > Leave this field empty unless you use a self-signed certificate for Authelia.</ div >
52
- </ div >
49
+ < div class ="fieldDescription "> The root CA for the Authelia server you wish to use for Authentication. Leave this field empty unless you use a self-signed certificate for Authelia.</ div >
53
50
</ div >
54
51
< div class ="checkboxContainer checkboxContainer-withDescription ">
55
52
< label >
56
53
< input
57
54
is ="emby-checkbox "
58
55
type ="checkbox "
59
- id ="boolCreateUserIfNotExists "
56
+ id ="CreateUserIfNotExists "
60
57
/>
61
58
< span > Create a new user on successful login</ span >
62
59
</ label >
@@ -66,7 +63,23 @@ <h2 class="sectionTitle">Authelia Settings:</h2>
66
63
< input
67
64
is ="emby-input "
68
65
type ="text "
69
- id ="txtJellyfinUrl "
66
+ id ="AutheliaAdminGroup "
67
+ label ="Authelia admin group name: "
68
+ />
69
+ < div class ="fieldDescription ">
70
+ < p > If not blank, this plugin will actively manage users administrator permissions in Jellyfin. On every successful log in this plugin will check if a user is a member of this group in Authelia:</ p >
71
+ < ul >
72
+ < li > If a user is a member of this group, they will be given administrator permissions in Jellyfin.</ li >
73
+ < li > If a user is not a member of this group, the administrator permission will be revoked in Jellyfin.</ li >
74
+ < li > If left blank, this plugin will not alter administrator permissions in Jellyfin.</ li >
75
+ </ ul >
76
+ </ div >
77
+ </ div >
78
+ < div class ="inputContainer ">
79
+ < input
80
+ is ="emby-input "
81
+ type ="text "
82
+ id ="JellyfinUrl "
70
83
required
71
84
placeholder ="jellyfin "
72
85
label ="Jellyfin Url: "
@@ -118,22 +131,27 @@ <h2 class="sectionTitle">Authelia Settings:</h2>
118
131
.emby-textarea + .fieldDescription {
119
132
margin-top : 0.25em ;
120
133
}
134
+ .fieldDescription > p {
135
+ margin-top : 0 ;
136
+ }
121
137
</ style >
122
138
123
139
< script type ="text/javascript ">
124
140
var AutheliaConfigurationPage = {
125
141
pluginUniqueId : "6bb8dbba-2aaa-4b19-9da4-f3bbb6c44091" ,
126
- AutheliaServer : document . querySelector ( "#txtAutheliaServer" ) ,
127
- AutheliaRootCa : document . querySelector ( "#txtAutheliaRootCa" ) ,
128
- CreateUserIfNotExists : document . querySelector ( "#boolCreateUserIfNotExists" ) ,
129
- JellyfinUrl : document . querySelector ( "#txtJellyfinUrl" ) ,
142
+ AutheliaServer : document . querySelector ( "#AutheliaServer" ) ,
143
+ AutheliaRootCa : document . querySelector ( "#AutheliaRootCa" ) ,
144
+ CreateUserIfNotExists : document . querySelector ( "#CreateUserIfNotExists" ) ,
145
+ AutheliaAdminGroup : document . querySelector ( "#AutheliaAdminGroup" ) ,
146
+ JellyfinUrl : document . querySelector ( "#JellyfinUrl" ) ,
130
147
} ;
131
148
132
149
document . querySelector ( ".esqConfigurationPage" ) . addEventListener ( "pageshow" , function ( ) {
133
150
window . ApiClient . getPluginConfiguration ( AutheliaConfigurationPage . pluginUniqueId ) . then ( function ( config ) {
134
151
AutheliaConfigurationPage . AutheliaServer . value = config . AutheliaServer ;
135
152
AutheliaConfigurationPage . AutheliaRootCa . value = config . AutheliaRootCa ;
136
153
AutheliaConfigurationPage . CreateUserIfNotExists . checked = config . CreateUserIfNotExists ;
154
+ AutheliaConfigurationPage . AutheliaAdminGroup . value = config . AutheliaAdminGroup ;
137
155
AutheliaConfigurationPage . JellyfinUrl . value = config . JellyfinUrl ;
138
156
139
157
AutheliaConfigurationPage . AutheliaRootCa . placeholder = AutheliaConfigurationPage . AutheliaRootCa . placeholder . replace ( / \\ n / g, "\n" ) ;
@@ -145,13 +163,12 @@ <h2 class="sectionTitle">Authelia Settings:</h2>
145
163
e . preventDefault ( ) ;
146
164
Dashboard . showLoadingMsg ( ) ;
147
165
148
- console . log ( "calling api????" ) ;
149
166
window . ApiClient . getPluginConfiguration ( AutheliaConfigurationPage . pluginUniqueId ) . then ( function ( config ) {
150
167
config . AutheliaServer = AutheliaConfigurationPage . AutheliaServer . value ;
151
168
config . AutheliaRootCa = AutheliaConfigurationPage . AutheliaRootCa . value ;
152
169
config . CreateUserIfNotExists = AutheliaConfigurationPage . CreateUserIfNotExists . checked ;
170
+ config . AutheliaAdminGroup = AutheliaConfigurationPage . AutheliaAdminGroup . value ;
153
171
config . JellyfinUrl = AutheliaConfigurationPage . JellyfinUrl . value ;
154
- console . log ( "????" ) ;
155
172
window . ApiClient . updatePluginConfiguration ( AutheliaConfigurationPage . pluginUniqueId , config ) . then ( Dashboard . processPluginConfigurationUpdateResult ) ;
156
173
} ) ;
157
174
0 commit comments