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

Former-commit-id: 685117ffd3
This commit is contained in:
Zack Scholl 2017-03-23 17:47:41 -06:00
parent 11b671423c
commit e066ad23cc

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
}