Commit 5c9880a5 authored by John Red Medrano's avatar John Red Medrano

testing

parent d42256c1
......@@ -121,14 +121,15 @@ class UserManagementRetreiveSerializer(serializers.ModelSerializer):
list_app = []
for data in app.order_by('id'):
if data.id != 1:
if data.id == 1 and user.user_type.upper() == enums.UserTypeEnum.SUPER_USER.value:
mod = data.modules.all()
if user.user_type.upper() != enums.UserTypeEnum.USER.value:
if user.user_type.upper() != enums.UserTypeEnum.USER.value:
user_module = models.Module.objects.filter(
name__icontains="user"
)
if data.id != 1:
# if data.id != 1 and user.user_type.upper() == enums.UserTypeEnum.SUPER_USER.value:
if data.id == 1 and user.user_type.upper() == enums.UserTypeEnum.SUPER_USER.value:
mod = mod.union(mod, user_module)
else:
mod = user_module
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment