@@ -109,7 +109,7 @@ def get(self, _external=False):
109109 def render (self ):
110110 if not has_permission ("READ" ):
111111 if not current_user .is_authenticated :
112- return redirect (url_for ("login" ))
112+ return redirect (url_for ("login" , next = request . full_path ))
113113 abort (403 )
114114 log = self .get ()
115115 pages = []
@@ -234,7 +234,7 @@ def revert(self, revision, message, author):
234234 def show_commit (self , revision ):
235235 if not has_permission ("READ" ):
236236 if not current_user .is_authenticated :
237- return redirect (url_for ("login" ))
237+ return redirect (url_for ("login" , next = request . full_path ))
238238 abort (403 )
239239 try :
240240 metadata , diff = storage .show_commit (revision )
@@ -460,7 +460,7 @@ def source(self, raw=False):
460460 # handle permissions
461461 if not has_permission ("READ" ):
462462 if not current_user .is_authenticated :
463- return redirect (url_for ("login" ))
463+ return redirect (url_for ("login" , next = request . full_path ))
464464 abort (403 )
465465 # handle case that the page doesn't exists
466466 if self .storage_error is not None :
@@ -841,7 +841,7 @@ def create(self):
841841 def blame (self ):
842842 if not has_permission ("READ" ):
843843 if not current_user .is_authenticated :
844- return redirect (url_for ("login" ))
844+ return redirect (url_for ("login" , next = request . full_path ))
845845 abort (403 )
846846 # handle case that the page doesn't exists
847847 if self .storage_error is not None :
@@ -907,7 +907,7 @@ def blame(self):
907907 def diff (self , rev_a = None , rev_b = None ):
908908 if not has_permission ("READ" ):
909909 if not current_user .is_authenticated :
910- return redirect (url_for ("login" ))
910+ return redirect (url_for ("login" , next = request . full_path ))
911911 abort (403 )
912912 # handle case that the page doesn't exists
913913 self .exists_or_404 ()
@@ -938,7 +938,7 @@ def diff(self, rev_a=None, rev_b=None):
938938 def history (self , rev_a : str | None = None , rev_b : str | None = None ):
939939 if not has_permission ("READ" ):
940940 if not current_user .is_authenticated :
941- return redirect (url_for ("login" ))
941+ return redirect (url_for ("login" , next = request . full_path ))
942942 abort (403 )
943943
944944 self .exists_or_404 (in_git = True )
@@ -1145,7 +1145,7 @@ def _attachments_list(self):
11451145 def render_attachments (self ):
11461146 if not has_permission ("READ" ):
11471147 if not current_user .is_authenticated :
1148- return redirect (url_for ("login" ))
1148+ return redirect (url_for ("login" , next = request . full_path ))
11491149 abort (403 )
11501150 # handle case that the page doesn't exists
11511151 self .exists_or_404 ()
@@ -1230,7 +1230,7 @@ def edit_attachment(
12301230 ):
12311231 if not has_permission ("READ" ):
12321232 if not current_user .is_authenticated :
1233- return redirect (url_for ("login" ))
1233+ return redirect (url_for ("login" , next = request . full_path ))
12341234 abort (403 )
12351235 a = Attachment (self .pagepath , filename )
12361236 if not a .exists ():
@@ -1457,7 +1457,7 @@ def delete(self, message, author):
14571457 def edit (self ):
14581458 if not has_permission ("READ" ):
14591459 if not current_user .is_authenticated :
1460- return redirect (url_for ("login" ))
1460+ return redirect (url_for ("login" , next = request . full_path ))
14611461 abort (403 )
14621462 if not self .exists ():
14631463 return abort (404 )
@@ -1482,7 +1482,7 @@ def edit(self):
14821482 def get (self ):
14831483 if not has_permission ("READ" ):
14841484 if not current_user .is_authenticated :
1485- return redirect (url_for ("login" ))
1485+ return redirect (url_for ("login" , next = request . full_path ))
14861486 abort (403 )
14871487 if self .revision is None :
14881488 if not storage .exists (self .filepath ):
@@ -1786,7 +1786,7 @@ def search(self):
17861786 def render (self ):
17871787 if not has_permission ("READ" ):
17881788 if not current_user .is_authenticated :
1789- return redirect (url_for ("login" ))
1789+ return redirect (url_for ("login" , next = request . full_path ))
17901790 abort (403 )
17911791 self .compile ()
17921792 result = self .search ()
0 commit comments