1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Allow raw to get locked copy

This commit is contained in:
Zack Scholl 2017-03-23 17:47:41 -06:00
parent 3f70a86d65
commit 685117ffd3

View File

@ -76,7 +76,8 @@ func handlePageRequest(c *gin.Context) {
p := Open(page)
// Disallow anything but viewing locked/encrypted pages
if (p.IsEncrypted || p.IsLocked) && command[0:2] != "/v" {
if (p.IsEncrypted || p.IsLocked) &&
(command[0:2] != "/v" && command[0:2] != "/r") {
c.Redirect(302, "/"+page+"/view")
return
}