Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Firestore information in CONTRIBUTING.md #trivial #313

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

andreicmirciu
Copy link
Member

Add more details regarding the Firestore users and forms collections used, according to the Encouraging actionable feedback from students through a mobile application paper.

@acs-upb-mobile-bot
Copy link
Member

acs-upb-mobile-bot commented Oct 9, 2021

1 Warning
⚠️ CONTRIBUTING.md#L937 - https://fontawesome.com/icons?d=gallery is dead. (503 Service Unavailable)(no-dead-link)

Generated by 🚫 Danger

@@ -409,6 +421,146 @@ Filter structure is public information and should never (or very rarely) need to

</details>

<details>
<summary class="collection" id="forms-collection"><b>forms</b></summary>
Initially, the purpose of this collection was to gather requests from users to change their permission level to contribute with various details introduced in the application, such as <a href=#events-collection>events</a> in the timetable or information about a particular <a href=#classes-collection>class</a>, like grading, valuable links, and resources. This form can be accessed by each user from the *Settings* page of the application.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The process behind the design is not relevant for documentation. We care about what the current state is, not what it used to be. Please remove the "initially... subsequently..." stuff and focus on the current state of the system.

Think about what someone who is using the database for the first time would need to understand about the structure of filters.

</tr>
</table>

The second document, `class_feedback_answers`, has a more complex structure. It is composed of multiple _subcollections, whose keys are defined by the number of the question in the feedback form. Furthermore, each _subcollection consists of a list of documents with an automatically generated key, while each document represents the answer submitted by a user to that question. As we reach the end of the hierarchy, an answer is composed of the actual value (the result or the comment provided), together with the details related to a class (its name, associated teacher, and assistant). To provide anonymity, we do not retain the ID of the user who completed a form. The structure of this document is as follows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's with the underscores?


###### Rules

Since forms in this collection are public information (_anyone can **read**_), altering and adding data here is a privilege and needs to be monitored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you just copy paste this from somewhere else? We're not monitoring squat about the forms. The monitoring thing was likely something I wrote for the collections where we're actually storing who made a change, like websites.


Since forms in this collection are public information (_anyone can **read**_), altering and adding data here is a privilege and needs to be monitored.

Users can **update** an existing form document _if their `permissionLevel` is equal to four_, more precisely they must have the role of admin. Additionally, _anyone who wants to **create** a new form document needs to be authenticated_ in the first place.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wrote this but didn't provide any reasoning for it -- in the context of the feedback forms for instance, it makes no sense (why would an admin want to modify a form in the first place?). I believe we added this for the sake of edit permission forms. I'm tagging @GhiaraD in this so that he can comment/make suggestions or even add a commit here to add more info, but we may actually want to consider having separate permissions for different forms.

Copy link
Member

@GhiaraD GhiaraD Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rules for forms are still a work in progress. Right now, admins can update any kind of form, but this rule is indeed intended only for permission requests. Admins can update them to mark them resolved.


Since forms in this collection are public information (_anyone can **read**_), altering and adding data here is a privilege and needs to be monitored.

Users can **update** an existing form document _if their `permissionLevel` is equal to four_, more precisely they must have the role of admin. Additionally, _anyone who wants to **create** a new form document needs to be authenticated_ in the first place.
Copy link
Member

@GhiaraD GhiaraD Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rules for forms are still a work in progress. Right now, admins can update any kind of form, but this rule is indeed intended only for permission requests. Admins can update them to mark them resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants