Class LaravelUi5\Sdk\Partners\Attributes\ScopedToActor

final
readonly
implements PartnerScopeAttributeInterface

Declares row-level visibility for an OData entity set as self-on-self: rows are visible when the keying column matches the current actor's own partner_id. Backed by {@see SelfResolver}.

Convention. The source query returned by baseQuery() must expose the column named by {@see $keyColumn} (defaults to partner_id).

Example. A hypothetical user-preferences entity set keyed on the actor's own partner_id:

#[ScopedToActor]
final readonly class MyPreferencesEntitySet extends ScopedAbstractEntitySet
{
    protected function baseQuery(): Builder
    {
        return DB::table('app_user_preferences');   // exposes `partner_id`
    }
}

Read by {@see \LaravelUi5\Sdk\Odata\ScopedAbstractEntitySet}; one scope-attribute declaration per entity set. See https://laravelui5.com/sdk/security/scoped-entity-sets for the design rationale and the resolver family this attribute is part of.

Methods