bypass profile select
This commit is contained in:
4
auth.md
4
auth.md
@@ -143,7 +143,9 @@ Behavior:
|
|||||||
|
|
||||||
- requests with `Host: 10.11.1.11:8090` or `Host: 10.11.1.11` use the built-in default admin user;
|
- requests with `Host: 10.11.1.11:8090` or `Host: 10.11.1.11` use the built-in default admin user;
|
||||||
- requests through the reverse proxy still require the configured auth provider;
|
- requests through the reverse proxy still require the configured auth provider;
|
||||||
- profile permissions are ignored for bypassed direct-IP requests because they run as the default admin user.
|
- profile permissions are ignored for bypassed direct-IP requests because they run as the default admin user;
|
||||||
|
- when no active profile is saved for the bypass user, pyTorrent opens the profile picker instead of silently selecting the first profile;
|
||||||
|
- after selecting a profile, the choice is saved in the default user's preferences and reused on the next direct-IP visit.
|
||||||
|
|
||||||
Do not add public domains to this list.
|
Do not add public domains to this list.
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ def active_profile(user_id: int | None = None):
|
|||||||
if row:
|
if row:
|
||||||
return row
|
return row
|
||||||
profiles = list_profiles(user_id)
|
profiles = list_profiles(user_id)
|
||||||
|
# Note: Trusted auth-bypass access must choose a profile explicitly on first entry,
|
||||||
|
# instead of silently reusing the first configured profile.
|
||||||
|
if auth.auth_bypassed_request() and profiles:
|
||||||
|
return None
|
||||||
return profiles[0] if profiles else None
|
return profiles[0] if profiles else None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -145,6 +145,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<div class="form-text">Changing rTorrent reloads the live torrent snapshot.</div>
|
<div class="form-text">Changing rTorrent reloads the live torrent snapshot.</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-sm btn-outline-secondary" data-bs-dismiss="modal" type="button">Cancel</button>
|
||||||
|
<button id="profilePickerUseBtn" class="btn btn-sm btn-primary" type="button"><i class="fa-solid fa-plug-circle-check"></i> Use selected</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user