AjobK / Seaqull

Seaqull programming blog
http://www.seaqull.com
4 stars 0 forks source link

213 admin ban user #260

Closed ryankroon00 closed 3 years ago

ryankroon00 commented 3 years ago

closes #213


What is it supposed to do
Make admins able to ban an account until a certain time (banned_by which stores admin id and banned_until which stores a datetime)

In addition to its original requirements, I also added a filter to the getProfile function so that it only returns users that aren't banned, and when a user is banned his current posts are hidden, and he can't log in.


How can we test your branch
Explain how can test your branch as specifically as possible. Mention the page, button, etc. (For back-end route, function, etc.) You can test the branch by following these steps:


General checklist


If relevant, front-end checklist


If relevant, back-end checklist


If relevant, test these browsers


PR Rules
1. Add relevant labels.
2. Select atleast two reviewers.
3. Assign all reviewers allowed to merge the branch, including yourself.
4. If relevant to the sprint, put related issue in 'Awaiting Approval' column on project board.
5. Add to the corresponding milestone.

AjobK commented 3 years ago

PREVIEW BUTTON MISSING ON LOGIN FORM

AjobK commented 3 years ago

image

Able to get ban popup as new user by clicking on banner

AjobK commented 3 years ago

image

Please limit so only 0 days or more is possible

AjobK commented 3 years ago

Able to actually ban users, even without priviliges

AjobK commented 3 years ago

image

Please make consistent use of date(s). Here you see a date string and unix timestamp, which should be interchangable but isn't

AjobK commented 3 years ago

Please remove hidden_at flag for posts to prevent update anomalies (3NF). To only display posts that are not made by a banner user, make use of joins and check if 'banned_at' unix is in the past or null.

However, the whole concept of NOT displaying posts of banner users will be moved to another issue.

AjobK commented 3 years ago

image

Lol?

AjobK commented 3 years ago

When I login I instantly get a 400 bad requests, but green checkmarks are shown above fields? Always getting 400 bad request whatever I do.

AjobK commented 3 years ago

Also, when you say login with admin please tell us the password and username

AjobK commented 3 years ago

image

Can't click the 'view' icon

AjobK commented 3 years ago

image

Still doesnt work for users that already exist even though I entered the wrong password