diff --git a/apps/perms/api/user_permission/accounts.py b/apps/perms/api/user_permission/accounts.py index 3b264f102..257ff8c31 100644 --- a/apps/perms/api/user_permission/accounts.py +++ b/apps/perms/api/user_permission/accounts.py @@ -1,12 +1,7 @@ from django.shortcuts import get_object_or_404 from rest_framework.generics import ListAPIView, get_object_or_404 -<<<<<<< HEAD -from common.utils import get_logger, lazyproperty -======= -from common.exceptions import JMSObjectDoesNotExist -from common.utils import get_logger, lazyproperty, is_uuid ->>>>>>> 0d3c5dddf9c838c5dcd28c20b6a8498088e45ce2 +from common.utils import get_logger from perms import serializers from perms.hands import Asset from perms.utils import PermAccountUtil @@ -26,21 +21,6 @@ class UserGrantedAssetAccountsApi(SelfOrPKUserMixin, ListAPIView): ('list', 'perms.view_userassets'), ) - @lazyproperty -<<<<<<< HEAD -======= - def user(self) -> User: - query_user = self.kwargs.get('user') - if is_uuid(query_user): - user = User.objects.get(id=query_user) - elif query_user == 'my': - user = self.request.user - else: - raise JMSObjectDoesNotExist(object_name=_('User')) - return user - - @lazyproperty ->>>>>>> 0d3c5dddf9c838c5dcd28c20b6a8498088e45ce2 def asset(self): asset_id = self.kwargs.get('asset_id') kwargs = {'id': asset_id, 'is_active': True} diff --git a/apps/perms/api/user_permission/mixin.py b/apps/perms/api/user_permission/mixin.py index 5b64804e0..510ed9f1a 100644 --- a/apps/perms/api/user_permission/mixin.py +++ b/apps/perms/api/user_permission/mixin.py @@ -68,7 +68,6 @@ class SelfOrPKUserMixin: return self.admin_rbac_perms def request_user_is_self(self): - print("user is: ", self.kwargs) return self.kwargs.get('user') in ['my', 'self'] @property