mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 19:43:01 +00:00
Use grants clone (#716)
This commit is contained in:
1 parent
08f047c157
commit
73db950ea4
3 files changed
+4
-6
No files matched your search
@@ -347,7 +347,7 @@ func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants {
|
||||
p.lock.RLock()
|
||||
defer p.lock.RUnlock()
|
||||
|
||||
return p.grants
|
||||
return p.grants.Clone()
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) SetPermission(permission *livekit.ParticipantPermission) bool {
|
||||
@@ -374,8 +374,6 @@ func (p *ParticipantImpl) SetPermission(permission *livekit.ParticipantPermissio
|
||||
video.Recorder = permission.Recorder
|
||||
|
||||
canPublish := video.GetCanPublish()
|
||||
|
||||
p.grants.Video = video
|
||||
p.lock.Unlock()
|
||||
|
||||
// publish permission has been revoked then remove all published tracks
|
||||
|
||||
Reference in new issue
Block a user