mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add /accounts/ (get, post) routes
Slight markup changes, same style overall and same form parameters as the PHP implementation. In addition, we've disabled the "left" and "right" navigation buttons when we're at the border of the table. CSS Changes: - Added similar styling to submit `<buttons>` that submit `<input>` had. - Added .results tr td[align="{left,right}"] styling to align the result table's `More -->` button to the right of the table. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
bdc913d088
commit
021a1c8fb6
7 changed files with 760 additions and 7 deletions
|
@ -168,6 +168,15 @@ class User(Base):
|
|||
aurweb.models.account_type.TRUSTED_USER_AND_DEV_ID
|
||||
}
|
||||
|
||||
def can_edit_user(self, user):
|
||||
""" Can this account record edit the target user? It must either
|
||||
be the target user or a user with enough permissions to do so.
|
||||
|
||||
:param user: Target user
|
||||
:return: Boolean indicating whether this instance can edit `user`
|
||||
"""
|
||||
return self == user or self.is_trusted_user() or self.is_developer()
|
||||
|
||||
def __repr__(self):
|
||||
return "<User(ID='%s', AccountType='%s', Username='%s')>" % (
|
||||
self.ID, str(self.AccountType), self.Username)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue