diff --git a/BackEndFlask/models/user.py b/BackEndFlask/models/user.py index cd200d141..dc9cf4624 100644 --- a/BackEndFlask/models/user.py +++ b/BackEndFlask/models/user.py @@ -186,7 +186,7 @@ def create_user(user_data): lms_id=user_data["lms_id"], consent=user_data["consent"], owner_id=user_data["owner_id"], - is_admin="role_id" in user_data.keys() and user_data["role_id"]==3, + is_admin="role_id" in user_data.keys() and user_data["role_id"] in [1,2,3], has_set_password=has_set_password, reset_code=None ) @@ -243,7 +243,7 @@ def load_SuperAdminUser(): "lms_id": 0, "consent": None, "owner_id": None, - "role_id": None, + "role_id": 2, "is_admin": True }) diff --git a/FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js b/FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js index 791169c53..fe4bab14c 100644 --- a/FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js +++ b/FrontEndReact/src/View/Admin/Add/AddUsers/AdminAddUser.js @@ -188,7 +188,7 @@ class AdminAddUser extends Component { "first_name": firstName, "last_name": lastName, "email": email, - "lms_id": lmsId != "" ? lmsId : null, + "lms_id": lmsId !== "" ? lmsId : null, "consent": null, "owner_id": cookies.get('user')['user_id'], "role_id": navbar.props.isSuperAdmin ? 3 : role