micro-users 1.8.2__py3-none-any.whl → 1.8.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of micro-users might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micro-users
3
- Version: 1.8.2
3
+ Version: 1.8.4
4
4
  Summary: Arabic Django user management app with abstract user, permissions, and activity logging
5
5
  Home-page: https://github.com/debeski/micro-users
6
6
  Author: DeBeski
@@ -214,3 +214,5 @@ MICRO_USERS_THEME = {
214
214
  | v1.8.0 | • **Permissions UI**: Complete redesign with App/Model-based grouping and hierarchical checkboxes<br>• **Aesthetics**: Applied modern glassmorphism theme to permission cards with interactive toggles<br>• **Security**: Implemented 3-level security logic (GM, SM, User) and "invisible" Superuser protection<br>• **Foolproofing**: Added self-editing protection for staff and scope enforcement for managers<br>• **Localization**: Fully translated system auth labels and metadata to Arabic |
215
215
  | v1.8.1 | • **UI Refinement**: Swapped `Email` and `Phone` positions across all forms, tables, and detail views<br>• **Field Logic**: Set `Email` and `Phone` as optional (not required) for all users<br>• **Security**: Added `manage_staff` custom permission to restrict `is_staff` management to authorized managers only<br>• **Bug Fix**: Reserved `manage_staff` assignment power strictly for Superusers and fixed UI grouping for custom permissions |
216
216
  | v1.8.2 | • **Login UX**: Enhanced login flow with auto-focus on username and improved "Enter to Submit" handling |
217
+ | v1.8.3 | • **CSP Compliance**: Added `nonce` attribute support to all inline and external script tags (Login, Permissions, Manage Users) for Content Security Policy compliance |
218
+ | v1.8.4 | • **Strict CSP**: Refactored inline JS event handlers to use Event Listeners, fully resolving CSP violation errors |
@@ -21,9 +21,9 @@ users/static/users/css/permissions.css,sha256=b5XwKZKqJvU8iTlSC8P2EIDflSUb-0PP-O
21
21
  users/static/users/css/profile.css,sha256=AZVDK0gFwGo0vgPrmZ0BJVAxax8Icf2h8WFVNbt1UeU,2908
22
22
  users/static/users/css/style.css,sha256=rlLk1P4uxw9TKwsFTmXR77gYy0bVptwjzO_m3VGlYDo,1789
23
23
  users/static/users/js/login.js,sha256=PmUXzsb1OYKne6XPZwolbTLWEZsl77J0pgRYakam1Wg,883
24
- users/static/users/js/permissions.js,sha256=v2h5JKAdhXYoLwOEK6hc82MWqbKS_zcUVQgFPKC3vV0,3658
25
- users/templates/registration/login.html,sha256=Ok9BEEBKjevbJVhEta_UC66LssNviefhpjoslhrdiFc,2926
26
- users/templates/users/manage_users.html,sha256=tIPkdFxm9lC_R184WQlm0UHV7sUS_xNo6f8AjgW18S8,6359
24
+ users/static/users/js/permissions.js,sha256=ILGKe8sNYS4p-dW-hAzhZ29UKSJwntw3B2NLciwR_Uk,3884
25
+ users/templates/registration/login.html,sha256=P-oUVjO6dd9AYJ_fAkGuJQm6JflqrAoVz7oAzvJYLbY,2958
26
+ users/templates/users/manage_users.html,sha256=wsvij8DzgP3NHD-dkibKUwg3Uj0lWMaAAapqpT4CHBk,6673
27
27
  users/templates/users/user_activity_log.html,sha256=nKVOvmkbVjGWZZyYNJahs7drWQFh_hvyUDWuauwJV6U,571
28
28
  users/templates/users/user_detail.html,sha256=FAPQYXr5qNgzaZ-mAnaNoCb8dVsUHtj_hY87ZYO9_d0,5302
29
29
  users/templates/users/user_form.html,sha256=jcyI7OQZOY4ue4DajPtfjAt2SmAYO5ZgHNOqTp2-FO0,1352
@@ -33,9 +33,9 @@ users/templates/users/partials/scope_manager.html,sha256=mqhSg2NA2U_Dc5bIf3OUasT
33
33
  users/templates/users/partials/user_actions.html,sha256=J44-sn0fMbLUWjdtlcf5YhgT5OYRykr1mFkeVXoI1ew,1543
34
34
  users/templates/users/profile/profile.html,sha256=HXxOWsGEAZb731iF-nY00dzbFcgVh60oF0C1X8AySb4,5377
35
35
  users/templates/users/profile/profile_edit.html,sha256=hhltTIdl62NNX290nFNZcQwbW1idXEU_DYlrAp07MWk,5242
36
- users/templates/users/widgets/grouped_permissions.html,sha256=y608c0rJlj73XBmZBNzjTbNlF7dlJf4AceN_g0mCbmA,4087
37
- micro_users-1.8.2.dist-info/LICENSE,sha256=Fco89ULLSSxKkC2KKnx57SaT0R7WOkZfuk8IYcGiN50,1063
38
- micro_users-1.8.2.dist-info/METADATA,sha256=_Dh-lrkRgm9txb5DrEZ94vI9dJvhSqYH2owxzvIuz-U,11117
39
- micro_users-1.8.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
40
- micro_users-1.8.2.dist-info/top_level.txt,sha256=tWT24ZcWau2wrlbpU_h3mP2jRukyLaVYiyHBuOezpLQ,6
41
- micro_users-1.8.2.dist-info/RECORD,,
36
+ users/templates/users/widgets/grouped_permissions.html,sha256=4xhrCnp7UxkZetTU9sezVRZaSn61-Ar9iCbdtufGSis,4100
37
+ micro_users-1.8.4.dist-info/LICENSE,sha256=Fco89ULLSSxKkC2KKnx57SaT0R7WOkZfuk8IYcGiN50,1063
38
+ micro_users-1.8.4.dist-info/METADATA,sha256=yQDP4uZAybtCQWkpps9MsZr8D2wXyUTDrY59q1rsHeg,11433
39
+ micro_users-1.8.4.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
40
+ micro_users-1.8.4.dist-info/top_level.txt,sha256=tWT24ZcWau2wrlbpU_h3mP2jRukyLaVYiyHBuOezpLQ,6
41
+ micro_users-1.8.4.dist-info/RECORD,,
@@ -82,4 +82,11 @@ document.addEventListener('DOMContentLoaded', function() {
82
82
  // Initial State Sync
83
83
  document.querySelectorAll('.model-group').forEach(group => updateModelMasterStatus(group));
84
84
  document.querySelectorAll('.permissions-card').forEach(card => updateAppMasterStatus(card));
85
+
86
+ // Prevent toggle propagation for specific elements
87
+ document.querySelectorAll('.prevent-toggle').forEach(el => {
88
+ el.addEventListener('click', function(e) {
89
+ e.stopPropagation();
90
+ });
91
+ });
85
92
  });
@@ -58,5 +58,5 @@
58
58
  </div>
59
59
  </div>
60
60
 
61
- <script src="{% static 'users/js/login.js' %}"></script>
61
+ <script src="{% static 'users/js/login.js' %}" nonce="{{ request.csp_nonce }}"></script>
62
62
  {% endblock %}
@@ -21,7 +21,7 @@
21
21
 
22
22
  <div class="mt-3">
23
23
  {% if not request.user.scope %}
24
- <button type="button" class="btn btn-info no-print" title="إدارة النطاقات" onclick="loadScopeManager()">
24
+ <button type="button" class="btn btn-info no-print" title="إدارة النطاقات" id="btn-manage-scopes">
25
25
  <i class="bi bi-list me-1 h4"></i> إدارة النطاقات
26
26
  </button>
27
27
  {% endif %}
@@ -74,7 +74,7 @@
74
74
  </div>
75
75
 
76
76
  <!-- Script for Scope Modal -->
77
- <script>
77
+ <script nonce="{{ request.csp_nonce }}">
78
78
  // Defined globally so they can be called from injected HTML
79
79
  function loadScopeManager() {
80
80
  const modal = new bootstrap.Modal(document.getElementById('scopeModal'));
@@ -134,6 +134,13 @@
134
134
  })
135
135
  .catch(err => console.error('Error deleting scope:', err));
136
136
  }
137
+
138
+ document.addEventListener('DOMContentLoaded', function() {
139
+ const btnManageScopes = document.getElementById('btn-manage-scopes');
140
+ if (btnManageScopes) {
141
+ btnManageScopes.addEventListener('click', loadScopeManager);
142
+ }
143
+ });
137
144
  </script>
138
145
  {% endblock %}
139
146
 
@@ -14,7 +14,7 @@
14
14
  aria-expanded="false">
15
15
 
16
16
  <div class="d-flex align-items-center">
17
- <div class="form-check me-3" onclick="event.stopPropagation()">
17
+ <div class="form-check me-3 prevent-toggle">
18
18
  <input class="form-check-input app-master-checkbox" type="checkbox" id="master_{{ app_label }}">
19
19
  <label class="form-check-label d-none" for="master_{{ app_label }}">تحديد الكل</label>
20
20
  </div>
@@ -71,5 +71,5 @@
71
71
  </div>
72
72
  </div>
73
73
 
74
- <script src="{% static 'users/js/permissions.js' %}"></script>
74
+ <script src="{% static 'users/js/permissions.js' %}" nonce="{{ request.csp_nonce }}"></script>
75
75
  {% endwith %}