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

Automatically create the instructor role once an instructor is created. #36

Open
fderyckel opened this issue Dec 9, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@fderyckel
Copy link
Owner

fderyckel commented Dec 9, 2020

Once an instructor is created, one should create the role of instructor.
If instructor is set to left then role should be updated to not be an instructor anymore \

Taken from Employee

def update_user(self):
	# add employee role if missing
	user = frappe.get_doc("User", self.user_id)
	user.flags.ignore_permissions = True

	if "Employee" not in user.get("roles"):
		user.append_roles("Employee")
@fderyckel fderyckel added bug Something isn't working enhancement New feature or request labels Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant