Skip to content

Change the defaultPermission default value to false for hasObjectPermissionTo #4383

@tzwer

Description

@tzwer

Is your feature request related to a problem? Please describe.

The current default value of defaultPermission = true is confusing and leads to mistakes while writing code especially if you were using it for the first time. When I read the word "has" I expect that this permission must be present/defined for that object, otherwise it's not.
This happened in admin panel which was abused by hackers, check these two PRs for more info:

Describe the solution you'd like

I suggest setting the default value of the defaultPermission parameter to false.

bool hasObjectPermissionTo ( string / element theObject, string theAction [, bool defaultPermission = false ] )

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions