rpitv / glimpse

Monorepo for the RPI TV Glimpse project
MIT License
3 stars 1 forks source link

Class static property `modelName` is required in many places when we should just use `name` #4

Open robere2 opened 1 year ago

robere2 commented 1 year ago

Currently, we require that new classes have the static modelName property for CASL subject type detection. We should just be using the class name via Class.name instead.

modelName can still be supported as a way to have the CASL subject name differ from the actual class name. With this, we should also be checking the modelName property on constructors for objects, as well (e.g. object.constructor.modelName ?? object.constructor.name)