mirror of https://github.com/msgbyte/tailchat
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			30 lines
		
	
	
		
			708 B
		
	
	
	
		
			Markdown
		
	
			
		
		
	
	
			30 lines
		
	
	
		
			708 B
		
	
	
	
		
			Markdown
		
	
---
 | 
						|
title: Group view panel permission problem
 | 
						|
authors: moonrailgun
 | 
						|
image: /img/logo.svg
 | 
						|
slug: view-panel-permission
 | 
						|
keywords:
 | 
						|
  - tailchat
 | 
						|
tags: []
 | 
						|
---
 | 
						|
 | 
						|
Because of new version of group permission, all group user which create group before cannot view panel because of lost view panel permission.
 | 
						|
 | 
						|
To batch update all group permission, you may need this script below.
 | 
						|
 | 
						|
Go into mongodb bash, you can use script in bash like its operation: `docker exec -it <your-mongodb-container-name> mongo`
 | 
						|
 | 
						|
 | 
						|
 | 
						|
### switch to tailchat db
 | 
						|
 | 
						|
```
 | 
						|
use tailchat
 | 
						|
```
 | 
						|
 | 
						|
### update all group and append `core.viewPanel` permission to all group
 | 
						|
 | 
						|
```
 | 
						|
db.groups.updateMany({}, { $addToSet: { fallbackPermissions: "core.viewPanel" } })
 | 
						|
```
 |