Commit a7bb4a1e authored by ZeMKI's avatar ZeMKI

Simplified add user

* now the user you invite are supervisors - with full power.
* consider to simplify the whole roles structure and just keep supervisors and work with permissions.
parent 6134e065
......@@ -32,7 +32,7 @@ class UserController extends Controller
*/
public function getinputdata()
{
$allRoles = [['value' => 3, 'name' => 'Researcher']];
$allRoles = [['value' => 2, 'name' => 'Supervisor']];
// $relatedstudies = Auth::user()->studiesforedit;
// $data['relatedstudies'] = $relatedstudies;
// if(in_array(1,Auth::user()->roles()->pluck('role_id')->toArray())){
......
......@@ -224,7 +224,7 @@
window.axios.post('getinputdata').then(response => {
this.inputs.userroles = response.data.allroles;
this.userroleselected = 3;
this.userroleselected = 2;
}).catch(error => {
console.log("error " + error);
......
......@@ -15,15 +15,6 @@
<span class="tag is-primary" v-if="role.pivot.study_id == study">{{role['name']}}</span>
</div>
</div>
<label class="checkbox" @change="changeEditPermission(caneditthisstudy[user['id']],user['id'])"
:disabled="studyeditable == false">
<input type="checkbox" v-model="caneditthisstudy[user['id']]" :disabled="studyeditable == false">
Can edit <strong>this</strong> study
</label>
<label class="checkbox" @change="changestudiespermission(cancreatestudies[user['id']],user)">
<input type="checkbox" v-model="cancreatestudies[user['id']]">
Can create studies
</label>
</div>
<a class="button is-light" id="open-user-modal" style="width: 100%; display: inline-flex;"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment