code: async def can(self, identity, permission) -> bool:
          
          assert isinstance(permission, (str, enum.Enum)), permission
          assert permission
          identify = await self.identity_policy.identify(identity)
          # non-registered user still may has some permissions
          access = await self.autz_policy.can(identify, permission)
          return access
docs: Check user permissions.
  
          :return: ``True`` if the identity is allowed the permission, else return ``False``.