Merge branch 'hotfix'
This commit is contained in:
commit
d44594fd39
3 changed files with 16 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '8.10.6'
|
||||
__version__ = '8.10.7'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -746,6 +746,11 @@ def sign_up(email, full_name, redirect_to):
|
|||
user.flags.ignore_permissions = True
|
||||
user.insert()
|
||||
|
||||
# set default signup role as per Portal Settings
|
||||
default_role = frappe.db.get_value("Portal Settings", None, "default_role")
|
||||
if default_role:
|
||||
user.add_roles(default_role)
|
||||
|
||||
if redirect_to:
|
||||
frappe.cache().hset('redirect_after_login', user.name, redirect_to)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,16 @@
|
|||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Portal Settings', {
|
||||
setup: function(frm){
|
||||
frm.fields_dict["default_role"].get_query = function(doc){
|
||||
return {
|
||||
filters: {
|
||||
"desk_access": 0,
|
||||
"disabled": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onload: function(frm) {
|
||||
frm.get_field('menu').grid.only_sortable();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue