File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -231,10 +231,12 @@ class PermissionsMapping {
231231
232232 private aliases = ( permission : WeaviatePermission ) => {
233233 if ( permission . aliases !== undefined ) {
234- const key = permission . aliases . alias ;
235- if ( key === undefined ) throw new Error ( 'Alias permission missing an alias' ) ;
236- if ( this . mappings . aliases [ key ] === undefined ) this . mappings . aliases [ key ] = { alias : key , actions : [ ] } ;
237- this . mappings . aliases [ key ] . actions . push ( permission . action as AliasAction ) ;
234+ const { alias, collection } = permission . aliases ;
235+ if ( alias === undefined ) throw new Error ( 'Alias permission missing an alias' ) ;
236+ if ( this . mappings . aliases [ alias ] === undefined ) {
237+ this . mappings . aliases [ alias ] = { alias, collection : collection || "*" , actions : [ ] } ;
238+ }
239+ this . mappings . aliases [ alias ] . actions . push ( permission . action as AliasAction ) ;
238240 }
239241 } ;
240242
You can’t perform that action at this time.
0 commit comments