InfectedLan / InfectedAPI

Backend for Infected's web solutions.
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Age restriction on NFC ports #220

Open petterroea opened 6 years ago

petterroea commented 6 years ago

We should be able to disallow participants under a certain age from exiting during a given time. This should also be overrideable.

halvors commented 6 years ago

Are you proposing we add a isImprisoned boolean to the useroptions table?

petterroea commented 6 years ago

Yes :D

halvors commented 6 years ago

Hmm. So if a user is under 18 years old. Add a global option to the user. So not per event.

petterroea commented 6 years ago

15 and under

petterroea commented 6 years ago

specifically, they aren't allowed out between 1 and 7 am if their parents havent given written access to it

halvors commented 6 years ago

How should this option be set? By parents? How should we administrate that?

halvors commented 6 years ago

So under 15 is disallowed by default?

petterroea commented 6 years ago

People have to contact us, we set a flag on their account. We could do it like swimming. Yes, they are disallowed by default

halvors commented 6 years ago

So we just need a way to manually enable it for users whom we have a written concent from parens for?

petterroea commented 6 years ago

Correct.

halvors commented 6 years ago

You answered my question already.

petterroea commented 6 years ago

whoops

petterroea commented 6 years ago

I think the user api should just return if the user account is exit limited or not. The age limit should be in settings.php, and i'l handle the actual access control in nfc code

halvors commented 6 years ago

You want me to implement api stuff for this?

halvors commented 6 years ago

You want me to implement api stuff for this?

petterroea commented 6 years ago

i'l handle the nfc part, but i'd love if you could implement a user flag which specifies if a given user is allowed outside during lockdown hours or not(is set if parents contact us)

halvors commented 6 years ago

@petterroea Will you handle when lockdown hours is, if i provide an boolean for it on the user object?

petterroea commented 6 years ago

@halvors a boolean in user object that specifies if the user should be locked or not?

halvors commented 6 years ago

@petterroea Yeah, just based on age and wheater concent is present for user or not?

petterroea commented 6 years ago

yes, so the boolean should return age<age_limit(set in settings) && !allowedOutside, where allowedOutside is a flag settable by admins on accounts

halvors commented 6 years ago

@petterroea Create an entirely new table for "allowedOutside" flag, or use the "useroption" table for this?

petterroea commented 6 years ago

i think useroption

halvors commented 6 years ago

Yeah, think so as well.