diff --git a/app/models.py b/app/models.py index 0021e1d2..26f7aee9 100644 --- a/app/models.py +++ b/app/models.py @@ -16,11 +16,12 @@ def url_to_title(url): return url.replace("_", " ") class UserRank(enum.Enum): - NEW_MEMBER = 0 - MEMBER = 1 - EDITOR = 2 - MODERATOR = 3 - ADMIN = 4 + NOT_JOINED = 0 + NEW_MEMBER = 1 + MEMBER = 2 + EDITOR = 3 + MODERATOR = 4 + ADMIN = 5 def atLeast(self, min): return self.value >= min.value @@ -59,7 +60,7 @@ class User(db.Model, UserMixin): self.username = username self.confirmed_at = datetime.datetime.now() - datetime.timedelta(days=6000) self.display_name = username - self.rank = UserRank.MEMBER + self.rank = UserRank.NOT_JOINED def isClaimed(self): return self.password is not None and self.password != "" diff --git a/app/templates/package_details.html b/app/templates/package_details.html index 971d3bd3..4f0ff6de 100644 --- a/app/templates/package_details.html +++ b/app/templates/package_details.html @@ -13,6 +13,14 @@ Name {{ package.name }} + + Author + + + {{ package.author.display_name }} + + + Type {{ package.type.value }} diff --git a/setup.py b/setup.py index 69c946e4..a058854e 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ if not os.path.isfile("db.sqlite"): ruben = User("rubenwardy") ruben.github_username = "rubenwardy" + ruben.rank = UserRank.MEMBER db.session.add(ruben) jeija = User("Jeija")