git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11966
e93f8b46-1217-0410-a6f0-
8f06a7374b81
@membership_by_project_id = nil
@notified_projects_ids = nil
@notified_projects_ids_changed = false
+ @builtin_role = nil
base_reload(*args)
end
# Returns the user's bult-in role
def builtin_role
- if logged?
- @role_non_member ||= Role.non_member
- else
- @role_anonymous ||= Role.anonymous
- end
+ @builtin_role ||= (logged? ? Role.non_member : Role.anonymous)
end
# Return user's roles for project
# Removes the :view_changesets permission from Anonymous role
remove_permission Role.anonymous, :view_changesets
+ User.current = nil
r = Issue.search(@issue_keyword).first
assert r.include?(@issue)
# Removes the :view_changesets permission from Non member role
remove_permission Role.non_member, :view_changesets
+ User.current = User.find_by_login('rhill')
r = Issue.search(@issue_keyword).first
assert r.include?(@issue)