Skip to content

Commit

Permalink
feat: support for changing account's email
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed May 18, 2021
1 parent e6a2e24 commit 4a50fc0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/appier_extras/parts/admin/models/account.py
Expand Up @@ -956,6 +956,18 @@ def change_username_s(self, username):
self.username = username
self.save()

@appier.operation(
name = "Change Email",
description = """Changing the email of an account is
a dangerous operation that may break relations with the
target account""",
parameters = (("Email", "email", str),),
level = 2
)
def change_email_s(self, email):
self.email = email
self.save(immutables_a = False)

@appier.link(name = "View Avatar", devel = True)
def view_avatar_url(self, absolute = False):
cls = self.__class__
Expand Down

0 comments on commit 4a50fc0

Please sign in to comment.