1.1 --- a/ApproveChangesSupport.py Tue Nov 05 22:18:45 2013 +0100
1.2 +++ b/ApproveChangesSupport.py Tue Nov 05 22:56:25 2013 +0100
1.3 @@ -2,10 +2,6 @@
1.4 """
1.5 MoinMoin - ApproveChanges library
1.6
1.7 - This library relies on the existence of a user (by default
1.8 - "ApprovalQueueUser") who has sufficient privileges to write pages with ACLs
1.9 - to an approval queue (ACL permissions "write,admin").
1.10 -
1.11 If users other than the superuser are to be able to edit pages freely, they
1.12 must be present in a group (by default "ApprovedGroup"), and if they are to
1.13 be allowed to review changes, they must be present in a different group (by
1.14 @@ -46,9 +42,6 @@
1.15 def get_page_reviewers_group(request):
1.16 return getattr(request.cfg, "reviewers_group", "PageReviewersGroup")
1.17
1.18 -def get_queued_changes_user(request):
1.19 - return getattr(request.cfg, "queued_changes_user", "ApprovalQueueUser")
1.20 -
1.21 def is_reviewer(request):
1.22 return request.user.valid and (
1.23 has_member(request, get_page_reviewers_group(request), request.user.name) or \
1.24 @@ -62,9 +55,6 @@
1.25 def user_is_approved(request, username):
1.26 return has_member(request, get_approved_editors_group(request), username)
1.27
1.28 -def is_queued_changes_user(request):
1.29 - return request.user.valid and request.user.name == get_queued_changes_user(request)
1.30 -
1.31 def is_queued_changes_page(request, pagename):
1.32
1.33 "Return whether 'pagename' is a queued changes page by testing its name."
1.34 @@ -81,16 +71,6 @@
1.35 extra_parts = directives.has_key(directive) and 2 or 1
1.36 return "/".join(page.page_name.split("/")[:-extra_parts])
1.37
1.38 -def get_user_for_saving(request):
1.39 -
1.40 - "Return a user that can save pages with ACLs."
1.41 -
1.42 - username = get_queued_changes_user(request)
1.43 -
1.44 - # If the user does not exist, just return the existing user.
1.45 -
1.46 - return get_user(request, username) or request.user
1.47 -
1.48 def get_user(request, username):
1.49
1.50 "Return the user having the given 'username'."