Closed Karyum closed 6 years ago
answering the questions above:
1) Instead of showing an option we would just do it automatically through the data-entry. the backend will check what is the role of the user who is currentley adding data and will toggle verified
to true if he is ADMIN
or SUPER
, and false for when BASIC
( we might need to add an explanation about this in the docs )
should we also have something in the API that checks for the role @des-des ?
2) So to add the verified key to the collections of events and places that are already in production we would first backup the database, and then use mlab's API to make a PUT
request and use $set: { verified: true }
on the collections to add it
thoughts @des-des ?
@Karyum okay, for the db, once we have implemented the correct API functionality in OTP, rather than manipulating the db directly, we can just use postman and add verified to all the datapoints using the OTP API.
We need to add permissioning to the verified field in OTP, we already have functionality to do fine grained permissioning, so you just need to add the config for the correct controllers.
Further, we want 2 things,
true
(For users with correct permissions who are logged in) - this will be for email
well first i should start by saying that all of the content in the API right now were set to verified true :grimacing: through making an API call to mlab straight away ( yeah also backed it up no worries :wink: )
I think this has also answered my comment https://github.com/foundersandcoders/open-tourism-platform/issues/178#issuecomment-370250060
i've also asked this here -> https://github.com/foundersandcoders/open-tourism-platform/issues/178#issuecomment-370250060 but where would we make the emails ?? ( might be rhetorical cause it would make sense to do it through the data entry i guess? )
add a verified key to the database schema of the event and place, which would be a Bool and the default would be false.
but there are 2 questions that needs answering: 1) In the data entry there would an option hidden from the BASIC user and only shown to the SUPER and ADMIN user that would verify it straight away correct ? ( only when a BASIC user tries to add an email would be sent ) 2) what does this adding a key mean for out production database @des-des ?