port from master: docman: fix upload when user has submit perms only