v1.0.0
This commit is contained in:
@@ -5,7 +5,7 @@ class EntrancesController {
|
||||
const { house_id } = req.params;
|
||||
|
||||
if (house_id) {
|
||||
if (req.sheepRole == "administrator" || (req.sheepRole == "moderator" && req.moderator.can_manager_territory) || req.can_view_territory) {
|
||||
if (req.possibilities.can_view_territory) {
|
||||
let result = await EntrancesService.getEntrances(house_id);
|
||||
if (result) {
|
||||
return res
|
||||
@@ -33,7 +33,7 @@ class EntrancesController {
|
||||
const data = req.body;
|
||||
|
||||
if (house_id) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_add_territory) {
|
||||
if (req.possibilities.can_add_territory) {
|
||||
let result = await EntrancesService.createEntrance(
|
||||
house_id,
|
||||
data
|
||||
@@ -62,7 +62,7 @@ class EntrancesController {
|
||||
const data = req.body;
|
||||
|
||||
if (data) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_add_territory) {
|
||||
if (req.possibilities.can_add_territory) {
|
||||
let result = await EntrancesService.updateEntrance(data);
|
||||
if (result) {
|
||||
return res.status(200).send(result);
|
||||
@@ -87,7 +87,7 @@ class EntrancesController {
|
||||
const data = req.body;
|
||||
|
||||
if (data) {
|
||||
if (req.sheepRole == "administrator" || req.moderator.can_add_territory) {
|
||||
if (req.possibilities.can_add_territory) {
|
||||
let result = await EntrancesService.deleteEntrance(data);
|
||||
if (result) {
|
||||
return res.status(200).send(result);
|
||||
|
||||
Reference in New Issue
Block a user