USER ROLES - vigneshnadar/InstaBook GitHub Wiki
Welcome to InstaBook : The ultimate search engine for books!! Description: InstaBook allows you to search , bookmark and review and books and follow users as well
Pre-requisite: As mentioned in the installation instructions WIKI Page Insert the following users in mongo db
db.user.insert({'username': 'alice', 'password': 'alice','admin':false,'isauthor':false}) db.user.insert({'username': 'bob', 'password': 'bob','admin':false,'isauthor':false}) db.user.insert({'username': 'charlie', 'password': 'charlie','admin':false,'isauthor':true}) db.user.insert({'username': 'dan', 'password': 'dan','admin':false,'isauthor':false}) db.user.insert({'username': 'admin', 'password': 'admin','admin':true,'isauthor':false})
User Role Descriptions
- alice, bob and dan are normal users using Insta book
- charlie is an author who can create a book
- admin has admin power to do crud on books and users
- unlogged in user can just search for books. He gets a pop up to log in when he tries to follow a user, bookmark or review a book
USER ROLE 1:
- Click on login button on the top nav bar
- Enter username and password as alice and alice
- you will be navigated to profile page. Here you can do 4 things a. Update your profile details b. View your bookmarked books c. View Following users d. View users who are following you Currently other than profile all sections are empty. Let us fill them up
- Click on Home on top of navbar You will be redirected to landing page. You will find a list of books in Instabook Scroll down and you will be able to view all InstaBook Users Follow 'dan', 'bob' and 'charlie'
- Click on profile page on top of navbar In the following section of profile page you can view dan bob and charlie
- Now go to home and click on either search books or find more of any of the books You will be redirected to search page Search for 'Harry Potter'. A list of harry potter books will appear Click on any one of them. You will see details of the book. Click on Bookmark button. Enter some text in review box and click on add review. You will see the reviews immediately. Now navigate to profile page you will see the bookmarked books
- Click on logout
USER ROLE 2: bob
- Log in with credentials of bob
- in the profile page you can see that she is followed by Alice
- You can perform all the functions performed by user role alice
USER ROLE 3: charlie who is an author
- Log in with credentials of charlie
- in the profile page you can see that she is followed by Alice
- You can perform all the functions performed by user role alice and bob
- In nav bar click on Author button. This button is visible only when you are logged in as author
- Enter book name description and url. click on create book. A new book will be created. You can click on delete icon to delete the book or click on edit icon Once you click on edit icon the book fields will be populated. You can then enter updated info and click on update book
USER ROLE 4: admin
- Log in with credentials of admin
- You can perform all the functions performed by user role alice and bob
- In nav bar click on admin button. This button is visible only when you are logged in as admin
- Here you will see 2 partitions to the screen one for users and other for books CRUD OPERATIONS for BOOK Enter book name description and url. click on create book. A new book will be created. You can click on delete icon to delete the book or click on edit icon Once you click on edit icon the book fields will be populated. You can then enter updated info and click on update book
CRUD OPERATIONS FOR USER Perform actions similar to the actions mentioned above for performing crud operations on user
UNLOGGEDIN USER: When the user is not logged in Profile button is not visible He can go on landing page but cannot follow users. Clicking on follow button gives a pop up of login He can search for books. He gets a pop up to log in when he tries to bookmark or review a book