micro-users 1.3.0__tar.gz → 1.3.1__tar.gz

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.

Files changed (35) hide show
  1. {micro_users-1.3.0 → micro_users-1.3.1}/PKG-INFO +2 -1
  2. {micro_users-1.3.0 → micro_users-1.3.1}/README.md +2 -1
  3. {micro_users-1.3.0 → micro_users-1.3.1}/micro_users.egg-info/PKG-INFO +2 -1
  4. {micro_users-1.3.0 → micro_users-1.3.1}/pyproject.toml +1 -1
  5. {micro_users-1.3.0 → micro_users-1.3.1}/setup.py +1 -1
  6. {micro_users-1.3.0 → micro_users-1.3.1}/users/views.py +6 -9
  7. {micro_users-1.3.0 → micro_users-1.3.1}/LICENSE +0 -0
  8. {micro_users-1.3.0 → micro_users-1.3.1}/MANIFEST.in +0 -0
  9. {micro_users-1.3.0 → micro_users-1.3.1}/micro_users.egg-info/SOURCES.txt +0 -0
  10. {micro_users-1.3.0 → micro_users-1.3.1}/micro_users.egg-info/dependency_links.txt +0 -0
  11. {micro_users-1.3.0 → micro_users-1.3.1}/micro_users.egg-info/requires.txt +0 -0
  12. {micro_users-1.3.0 → micro_users-1.3.1}/micro_users.egg-info/top_level.txt +0 -0
  13. {micro_users-1.3.0 → micro_users-1.3.1}/setup.cfg +0 -0
  14. {micro_users-1.3.0 → micro_users-1.3.1}/users/__init__.py +0 -0
  15. {micro_users-1.3.0 → micro_users-1.3.1}/users/admin.py +0 -0
  16. {micro_users-1.3.0 → micro_users-1.3.1}/users/apps.py +0 -0
  17. {micro_users-1.3.0 → micro_users-1.3.1}/users/filters.py +0 -0
  18. {micro_users-1.3.0 → micro_users-1.3.1}/users/forms.py +0 -0
  19. {micro_users-1.3.0 → micro_users-1.3.1}/users/migrations/0001_initial.py +0 -0
  20. {micro_users-1.3.0 → micro_users-1.3.1}/users/migrations/0002_alter_useractivitylog_action.py +0 -0
  21. {micro_users-1.3.0 → micro_users-1.3.1}/users/migrations/__init__.py +0 -0
  22. {micro_users-1.3.0 → micro_users-1.3.1}/users/models.py +0 -0
  23. {micro_users-1.3.0 → micro_users-1.3.1}/users/signals.py +0 -0
  24. {micro_users-1.3.0 → micro_users-1.3.1}/users/static/css/login.css +0 -0
  25. {micro_users-1.3.0 → micro_users-1.3.1}/users/static/img/default_profile.webp +0 -0
  26. {micro_users-1.3.0 → micro_users-1.3.1}/users/tables.py +0 -0
  27. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/registration/login.html +0 -0
  28. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/user_activity_log.html +0 -0
  29. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/manage_users.html +0 -0
  30. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/profile.html +0 -0
  31. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/profile_edit.html +0 -0
  32. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/user_actions.html +0 -0
  33. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/user_detail.html +0 -0
  34. {micro_users-1.3.0 → micro_users-1.3.1}/users/templates/users/user_form.html +0 -0
  35. {micro_users-1.3.0 → micro_users-1.3.1}/users/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micro_users
3
- Version: 1.3.0
3
+ Version: 1.3.1
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
@@ -130,3 +130,4 @@ users/
130
130
  | v1.2.3 | • Separated user detail view from table for consistency<br> • Optimized the new detail + log view for optimal compatibiliyy with users |
131
131
  | v1.2.4 | • Fixed a couple of visual inconsistencies |
132
132
  | v1.3.0 | • Patched a critical security permission issue<br> • Disabled ADMIN from being viewed/edited from other staff members<br> • Fixed an issue when sorting with full_name<br> • Enabled Logging for all actions |
133
+ | v1.3.1 | • replaced a misplaced code that caused a crash when editing profile |
@@ -98,4 +98,5 @@ users/
98
98
  | v1.2.1 | • Fixed a minor import bug |
99
99
  | v1.2.3 | • Separated user detail view from table for consistency<br> • Optimized the new detail + log view for optimal compatibiliyy with users |
100
100
  | v1.2.4 | • Fixed a couple of visual inconsistencies |
101
- | v1.3.0 | • Patched a critical security permission issue<br> • Disabled ADMIN from being viewed/edited from other staff members<br> • Fixed an issue when sorting with full_name<br> • Enabled Logging for all actions |
101
+ | v1.3.0 | • Patched a critical security permission issue<br> • Disabled ADMIN from being viewed/edited from other staff members<br> • Fixed an issue when sorting with full_name<br> • Enabled Logging for all actions |
102
+ | v1.3.1 | • replaced a misplaced code that caused a crash when editing profile |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micro-users
3
- Version: 1.3.0
3
+ Version: 1.3.1
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
@@ -130,3 +130,4 @@ users/
130
130
  | v1.2.3 | • Separated user detail view from table for consistency<br> • Optimized the new detail + log view for optimal compatibiliyy with users |
131
131
  | v1.2.4 | • Fixed a couple of visual inconsistencies |
132
132
  | v1.3.0 | • Patched a critical security permission issue<br> • Disabled ADMIN from being viewed/edited from other staff members<br> • Fixed an issue when sorting with full_name<br> • Enabled Logging for all actions |
133
+ | v1.3.1 | • replaced a misplaced code that caused a crash when editing profile |
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "micro_users"
11
- version = "1.3.0"
11
+ version = "1.3.1"
12
12
  description = "Arabic Django user management app with abstract user, permissions, and activity logging"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="micro_users",
8
- version="1.3.0",
8
+ version="1.3.1",
9
9
  author="DeBeski",
10
10
  author_email="debeski1@gmail.com",
11
11
  description="Arabic django user management app with abstract user, permissions, and activity logging",
@@ -100,6 +100,12 @@ def create_user(request):
100
100
  @user_passes_test(is_staff)
101
101
  def edit_user(request, pk):
102
102
  user = get_object_or_404(User, pk=pk)
103
+
104
+ # 🚫 Block staff users from editing superuser accounts
105
+ if user.is_superuser and not request.user.is_superuser:
106
+ messages.error(request, "لا يمكن تعديل هذا الحساب!")
107
+ return redirect('manage_users')
108
+
103
109
  form_reset = ResetPasswordForm(user, data=request.POST or None)
104
110
 
105
111
  if request.method == "POST":
@@ -216,12 +222,6 @@ def user_profile(request):
216
222
  # Function for editing the user profile
217
223
  @login_required
218
224
  def edit_profile(request):
219
-
220
- # 🚫 Block staff users from editing superuser accounts
221
- if request.user.is_superuser and not request.user.is_superuser:
222
- messages.error(request, "لا يمكنك تعديل حساب المدير!")
223
- return redirect('user_profile')
224
-
225
225
  if request.method == 'POST':
226
226
  form = UserProfileEditForm(request.POST, request.FILES, instance=request.user)
227
227
  if form.is_valid():
@@ -231,9 +231,6 @@ def edit_profile(request):
231
231
  return redirect('user_profile')
232
232
  else:
233
233
  messages.error(request, 'حدث خطأ أثناء حفظ التغييرات')
234
-
235
234
  else:
236
235
  form = UserProfileEditForm(instance=request.user)
237
-
238
236
  return render(request, 'users/profile_edit.html', {'form': form})
239
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes