Version: 1.0.11.0.21.0.31.0.41.0.51.0.61.0.81.0.91.0.101.0.111.0.131.0.201.0.211.0.221.0.231.0.241.0.251.0.261.0.271.0.281.0.291.0.301.0.311.0.321.0.331.0.341.0.351.0.361.0.371.0.381.0.391.0.401.0.411.0.421.0.431.0.441.0.451.0.461.0.471.0.481.0.491.0.501.0.511.0.521.0.531.0.541.0.551.0.561.0.571.0.581.0.591.0.601.0.611.0.621.0.631.0.641.0.651.0.661.0.671.0.681.0.691.0.701.0.711.0.721.0.731.0.741.0.751.0.761.0.771.0.781.0.791.0.801.0.811.0.821.0.831.0.841.0.851.0.861.0.871.0.881.0.891.0.901.0.911.0.921.0.931.0.941.0.951.0.961.0.971.0.981.0.991.0.1001.0.1011.0.1021.0.1031.0.1041.0.1051.0.1061.0.1071.0.1081.0.1091.0.1101.0.1111.0.1121.0.1131.0.1141.0.1151.0.1161.0.1171.0.1181.0.1191.0.1201.0.1211.0.1221.0.1231.0.1241.0.1251.0.1261.0.1271.0.1281.0.1291.0.1301.0.1311.0.1321.0.1331.0.1341.0.1351.0.1361.0.1371.0.1381.0.1391.0.1401.0.1411.0.1421.0.1431.0.1441.4.01.4.11.5.01.5.11.5.21.5.31.5.41.5.51.5.61.5.71.5.81.5.91.5.101.5.111.5.121.6.01.7.01.7.11.7.21.7.31.7.41.7.51.7.61.7.71.7.81.7.91.7.101.7.111.7.121.7.131.7.141.7.151.7.161.7.171.7.191.7.211.7.221.7.231.7.241.8.01.9.01.10.01.10.11.10.21.10.41.10.51.11.01.11.11.11.21.11.31.12.01.12.11.12.21.12.31.12.41.12.51.12.61.12.71.12.81.13.01.14.01.14.11.14.21.14.31.15.01.16.01.16.21.16.41.16.51.16.61.16.71.16.81.16.91.16.101.16.111.17.01.17.11.17.21.17.31.17.41.17.51.17.61.17.71.17.81.17.91.17.101.17.111.17.121.17.131.18.01.18.11.18.21.18.31.18.41.18.51.19.01.19.11.19.21.19.31.19.41.19.51.19.71.19.81.19.91.19.101.19.111.19.121.19.131.20.01.21.01.21.11.21.21.21.31.22.01.22.11.22.21.22.31.22.41.22.51.23.01.23.11.23.21.24.01.25.01.25.12.0.12.0.52.0.62.0.92.1.02.1.32.1.43.1.03.1.23.1.53.2.03.3.03.3.13.3.53.4.03.4.63.4.93.4.103.4.123.5.34.0.24.1.04.1.14.4.174.5.13
module.exports = ({ user, grant }, res, next) => {
if (!user && (!grant || grant.role !== 'Public'))
return res.status(401).send();
return next();
};