firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.13k stars 185 forks source link

Access to entity on permissions builder (outdated docs) #592

Closed andreassh closed 1 month ago

andreassh commented 9 months ago

In the docs it states that you can access the current entity in the permissionsBuilder. This seems outdated according to the types.d definitions. Docs says that you the permissionsBuilder is called with following properties:

{
    entity,
    path,
    user,
    authController,
    context
}

But types says its called with:

{ 
  pathSegments, 
  user, 
  collection,
  authController 
} 

Which seems to be right.

But what can be done do make permissions dependent on properties on and entity in v. 2.2.0? E.g. if you want do disable create, depending on an entity prop?

fgatti675 commented 1 month ago

Sorry for the late reply. entity is there in permissions builder in v3 :)