Comments (7)
I think holding the banDuration as an int (seconds) would be nicer, together with DateInfracted we could always get the exact end-date of a ban by adding the seconds to the DateInfracted date (a method the DateTime class provides)
So when we handle a user login we could check if they have any infractions where this calculated date is still in the future - > ergo they're still banned.
This way we wouldn't need isBan, since we can simply check if banDuration is 0. (I mentioned this in #23 too) If it is, the infraction was just a warning. (this would also work if we keep it a string(check for null or empty) , so if you don't agree with the above change still consider this one)
from smashhub.
I definitely like that approach better, I'll fix it on the issue here. Thanks!
from smashhub.
One issue that we would need to think about is permanent bans, since we cant represent those this way... (unless we just set the ban duration to int.MaxValue, but that doesn't seem too clean) Just thought of this, any ideas for that?
I guess we could also add a boolean isPermanent... Or just delete the User on perman bans and add their email to a blacklist? Seems a bit excessive though, since they may have submitted good combos even though they got banned and then those would be deleted. Or we set the banDuration to a negative value (-1) if its permanent and check for that, but that feels a bit hack-y... Just throwing ideas around here.
from smashhub.
I don't think you could have combo and comment id on report. You'll be able to access the report from the combo or comment respectively. This will stop the report object from getting unnecessarily bloated with ids.
from smashhub.
Yeah I was starting to feel that these models are looking messy with IDs that way. I'll remove it here. I wonder if we can just set the perma-bans to something unnecessarily long?
from smashhub.
We could set them to int.MaxValue and check for that, longer is impossible unless we change the data type, unless we treat the banTime not as seconds but days or something, that would work too.
from smashhub.
Anyway, I'll get started on this now and have a pull request up soon for review.
from smashhub.
Related Issues (20)
- Create exception pages for authorisation
- Change Date display format HOT 2
- Add an "applies to echo" option on combo creation HOT 2
- Add a "50/50" option alongside true/not true
- Add strong and weak hit conditionals
- Test issue HOT 1
- Create DifficultySlider component
- Upload assets to Cloudinary
- Create DifficultyScale component
- Set up storybook project
- Set up NX mono repo
- Set up repo with GitHub workflow
- Set up initial CI/CD pipeline
- Set up deployment for Component Library
- Set up deployment for Web App
- Set up environments
- Create color palette page
- Create typeface page
- Set up darkmode for storybook
- Upgrade to .NET 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smashhub.