mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-06 13:47:59 +02:00
Add user ban/activate feature
Add admin endpoints to ban and activate users, block banned users from all auth flows (OAuth, token login, bearer auth), and invalidate existing sessions on next request. Includes frontend translation and user detail page ban/activate buttons.
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
</span>
|
||||
<span class="type-badge type-repo" ng-if="userInfo.isAdmin">Admin</span>
|
||||
</h1>
|
||||
<div class="user-actions" style="margin-top: 4px;">
|
||||
<button class="btn btn-sm text-danger" ng-if="userInfo.status !== 'banned'" ng-click="banUser()"><i class="fas fa-ban"></i> Ban</button>
|
||||
<button class="btn btn-sm" ng-if="userInfo.status === 'banned' || userInfo.status === 'removed'" ng-click="activateUser()"><i class="fas fa-check-circle"></i> Activate</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user