-
Notifications
You must be signed in to change notification settings - Fork 1
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
Automatically tag Instructor/Student topics with resolution status upon post #36
Conversation
Create Student group upon Install. Add membership checks for Instructors/Students groups. Upon post creation, tag with "instructor-post"/"unresolved" tags for Instructors/Students respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled & tested, looks good to me.
await privileges.global.give(defaultPrivileges.concat(['groups:view:users:info']), 'Instructors'); | ||
console.log('===000===000===GAVE INSTRUCTORS PERMS'); | ||
await privileges.global.give(defaultPrivileges.concat([ | ||
'groups:ban', 'groups:upload:post:file']), 'Global Moderators'); | ||
await privileges.global.give(['groups:view:users', 'groups:view:tags', 'groups:view:groups'], 'guests'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Test Coverage Report for Build 13250887416Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Context
Resolves issues #30 and #27 and addresses #24. Addresses user stories for resolved/unresolved posts and instructor role indicator.
Description
Created Students group on installation. Dependent on Instructors group created in
add-role-groups
branch. Add membership checks for Instructors/Students groups. Upon topic creation, tag with "instructor-post"/"unresolved" tags for Instructors/Students.Codebase Changes
src/install.js
: FunctioncreateStudentsGroup
initializes Students group and privileges are given in the same file.src/privileges/users.js
: FunctionsisInstructor
andisStudent
are group membership checks for users.src/user/index.js
: Exports the membership functions as part of user.src/topics/create.js
: ModifiesTopics.post
to automatically add 'unresolved' and 'instructor-post' tags to topics when they are created by users in the 'Students' and 'Instructors' groups respectively.Additional Information
Ran lint and test and tested using the following steps.
User testing:
instructor-post
tag should be automatically addedunresolved
tag should be automatically added