1) Create 3 Entities
- Student (Generalization of Administration.Account) in case each one of them are going to be the users of the system)
- Group
- Book
Essentially, both books and students belong to one or many groups. For a student to access the book, he/she must be assigned to at least one of the group(s) that the book belongs to
2) Create Association Student_Group (Many-Many)
3) Create Association Book_Group (Many-Many)
4) Create a Microflow as data source for Book Pages
This workflow should
a) Retrieve the groups that the student belongs to
b) Retrieve for each of the group above, the books into one list (in a loop)
Pass that list as the object to the Book Page
Hope this helps. if you need more help, please let me know
A simpler, though less flexible solution would be to create SecurityLevel (attribute of Book Entity) for each book 1,2,34 etc and assign each group a SecurityLevel (attribute of Group Entity)
You can check the highest securityLevel of student by checklist the highest security level of his/her groups. If that is >= the book security level, student can access the book. But this will also need a microflow to implement since XPath doesn’t support nested query