forked from gitea/gitea
backport #21210, fix #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as count can never be less then 0. Tests are on main branch.
backport #21210, fix #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as count can never be less then 0. Tests are on main branch.