Show More
@@ -30,21 +30,21 b' from pylons.i18n.translation import _' | |||
|
30 | 30 | |
|
31 | 31 | import ipaddress |
|
32 | 32 | from sqlalchemy.exc import DatabaseError |
|
33 | from sqlalchemy.sql.expression import true, false | |
|
34 | 33 | |
|
35 | 34 | from rhodecode import events |
|
36 | 35 | from rhodecode.lib.user_log_filter import user_log_filter |
|
37 | 36 | from rhodecode.lib.utils2 import ( |
|
38 | 37 | safe_unicode, get_current_rhodecode_user, action_logger_generic, |
|
39 | 38 | AttributeDict, str2bool) |
|
39 | from rhodecode.lib.exceptions import ( | |
|
40 | DefaultUserException, UserOwnsReposException, UserOwnsRepoGroupsException, | |
|
41 | UserOwnsUserGroupsException, NotAllowedToCreateUserError) | |
|
40 | 42 | from rhodecode.lib.caching_query import FromCache |
|
41 | 43 | from rhodecode.model import BaseModel |
|
42 | 44 | from rhodecode.model.auth_token import AuthTokenModel |
|
43 |
from rhodecode.model.db import ( |
|
|
44 | or_, joinedload, User, UserToPerm, UserEmailMap, UserIpMap, UserLog) | |
|
45 | from rhodecode.lib.exceptions import ( | |
|
46 | DefaultUserException, UserOwnsReposException, UserOwnsRepoGroupsException, | |
|
47 | UserOwnsUserGroupsException, NotAllowedToCreateUserError) | |
|
45 | from rhodecode.model.db import ( | |
|
46 | _hash_key, true, false, or_, joinedload, User, UserToPerm, | |
|
47 | UserEmailMap, UserIpMap, UserLog) | |
|
48 | 48 | from rhodecode.model.meta import Session |
|
49 | 49 | from rhodecode.model.repo_group import RepoGroupModel |
|
50 | 50 | |
@@ -70,12 +70,12 b' class UserModel(BaseModel):' | |||
|
70 | 70 | |
|
71 | 71 | return { |
|
72 | 72 | 'id': user.user_id, |
|
73 | 'first_name': user.name, | |
|
74 | 'last_name': user.lastname, | |
|
73 | 'first_name': h.escape(user.name), | |
|
74 | 'last_name': h.escape(user.lastname), | |
|
75 | 75 | 'username': user.username, |
|
76 | 76 | 'email': user.email, |
|
77 | 77 | 'icon_link': h.gravatar_url(user.email, 30), |
|
78 | 'value_display': h.person(user), | |
|
78 | 'value_display': h.escape(h.person(user)), | |
|
79 | 79 | 'value': user.username, |
|
80 | 80 | 'value_type': 'user', |
|
81 | 81 | 'active': user.active, |
@@ -28,16 +28,17 b' import logging' | |||
|
28 | 28 | import traceback |
|
29 | 29 | |
|
30 | 30 | from rhodecode.lib.utils2 import safe_str, safe_unicode |
|
31 | from rhodecode.lib.exceptions import ( | |
|
32 | UserGroupAssignedException, RepoGroupAssignmentError) | |
|
33 | from rhodecode.lib.utils2 import ( | |
|
34 | get_current_rhodecode_user, action_logger_generic) | |
|
31 | 35 | from rhodecode.model import BaseModel |
|
32 | 36 | from rhodecode.model.scm import UserGroupList |
|
33 | 37 | from rhodecode.model.db import ( |
|
34 | 38 | true, func, User, UserGroupMember, UserGroup, |
|
35 | 39 | UserGroupRepoToPerm, Permission, UserGroupToPerm, UserUserGroupToPerm, |
|
36 | 40 | UserGroupUserGroupToPerm, UserGroupRepoGroupToPerm) |
|
37 | from rhodecode.lib.exceptions import ( | |
|
38 | UserGroupAssignedException, RepoGroupAssignmentError) | |
|
39 | from rhodecode.lib.utils2 import ( | |
|
40 | get_current_rhodecode_user, action_logger_generic) | |
|
41 | ||
|
41 | 42 | |
|
42 | 43 | log = logging.getLogger(__name__) |
|
43 | 44 |
General Comments 0
You need to be logged in to leave comments.
Login now