Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 906ff17

Browse files
committed
bugfix
1 parent 752b72d commit 906ff17

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/logic/common.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ func CanEdit(me *model.Me, curModel interface{}) bool {
6666

6767
switch entity := curModel.(type) {
6868
case *model.Topic:
69-
if time.Now().Sub(time.Time(entity.Ctime)) > canEditTime {
70-
if me.Uid != entity.Uid && me.IsAdmin {
71-
return true
72-
}
69+
if me.Uid != entity.Uid && me.IsAdmin {
70+
return true
71+
}
7372

73+
if time.Now().Sub(time.Time(entity.Ctime)) > canEditTime {
7474
return false
7575
}
7676

0 commit comments

Comments
 (0)