Merge pull request #16885 from gavindsouza/show-all-role-warning
fix(ux): Show note on how 'All' Role impacts users
This commit is contained in:
commit
04baffb1ab
1 changed files with 9 additions and 2 deletions
|
|
@ -1,8 +1,15 @@
|
|||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
// MIT License. See license.txt
|
||||
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
// MIT License. See LICENSE
|
||||
|
||||
frappe.ui.form.on('Role', {
|
||||
refresh: function(frm) {
|
||||
if (frm.doc.name === "All") {
|
||||
frm.dashboard.add_comment(
|
||||
__("Role 'All' will be given to all System Users."),
|
||||
"yellow"
|
||||
);
|
||||
}
|
||||
|
||||
frm.set_df_property('is_custom', 'read_only', frappe.session.user !== 'Administrator');
|
||||
|
||||
frm.add_custom_button("Role Permissions Manager", function() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue