mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Merge pull request 'make admin exempt from created_recently restrictions' (#223) from h3ndrik/pyfedi:created_recently into main
Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/223
This commit is contained in:
commit
72320a0178
1 changed files with 2 additions and 0 deletions
|
@ -846,6 +846,8 @@ class User(UserMixin, db.Model):
|
|||
return result
|
||||
|
||||
def created_recently(self):
|
||||
if self.is_admin():
|
||||
return False
|
||||
return self.created and self.created > utcnow() - timedelta(days=7)
|
||||
|
||||
def has_blocked_instance(self, instance_id: int):
|
||||
|
|
Loading…
Add table
Reference in a new issue