Bud fixed - Super Admin restrictions
This commit is contained in:
parent
950f1f6d3f
commit
14da0fb727
@ -60,6 +60,12 @@ exports.updateUser = async (req, res) => {
|
||||
try {
|
||||
|
||||
const { name, email,is_active } = req.body;
|
||||
if (email === 'bhavinkumar.chandulal@fcsc.gov.ae') {
|
||||
return res.status(403).json({
|
||||
status: "error",
|
||||
message: "You cannot modify Super Admin data."
|
||||
});
|
||||
}
|
||||
const [updated] = await User.update({ name, email, is_active}, { where: { id: req.params.id } });
|
||||
|
||||
if (updated) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user