mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 08:04:34 +08:00
Merge pull request #7974 from artoscinote/ma_SCI_11188
Improve behaviour for private team sharing [SCI-11188]
This commit is contained in:
commit
b7e1596e52
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ class TeamSharedObjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def shareable_teams
|
||||
teams = Team.order(:name).all - [@model.team]
|
||||
teams = (Team.order(:name).all - [@model.team]).filter { |t| can_read_team?(t) || @model.private_shared_with?(t) }
|
||||
render json: teams, each_serializer: ShareableTeamSerializer, model: @model
|
||||
end
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<template v-for="team in shareableTeams">
|
||||
<div class="col-span-2 flex items-center h-9 gap-1" :class="{ 'hidden': !team.attributes.readable && !team.attributes.private_shared_with }">
|
||||
<div class="col-span-2 flex items-center h-9 gap-1">
|
||||
<span class="sci-checkbox-container" :class="{'opacity-0 pointer-events-none': sharedWithAllRead}">
|
||||
<input :disabled="!team.attributes.readable" type="checkbox" class="sci-checkbox" v-model="team.attributes.private_shared_with" />
|
||||
<span class="sci-checkbox-label"></span>
|
||||
|
|
Loading…
Add table
Reference in a new issue