View Issue Details

IDProjectCategoryView StatusLast Update
0025019mantisbtfeaturepublic2018-12-04 05:48
Reportercristobal.manriqueAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionno change required 
Product Version2.15.1 
Target VersionFixed in Version 
Summary0025019: Access_has_local_level
Description

I want to check user permission againts the user's local level. This is, the level of the user for a specific project, regardless of the user global access level. (project is private, so i don't want to allow the user to access based on it's global level).

Even when i could finally figure out how the access_api works, I guess that a function like "acces_has_local_level" would be the natural way to check this.

I mean, there are these functions in the acess_api:
access_get_global_level
access_get_local_level
access_get_project_level

But there are only two corresponding functions:
access_has_global_level (makes use of access_get_global_level)
access_has_project_level(makes use of access_get_project_level)

Shouldn't we have an "access_has_local_level" function, making use of access_get_local_level?

TIA.

TagsNo tags attached.

Activities

cproensa

cproensa

2018-12-04 05:46

developer   ~0061037

Last edited: 2018-12-04 05:48

View 2 revisions

This function has a very specific purpose, as you can read in the comments:

access_get_local_level
get the user's access level specific to this project. return false (0) if the user has no access override here

This doesn't return a consolidated access level.

Mantis stacks the different rules for global access, project overrides, private threshold...
When querying access api to check for access, in specific contexts (global, a project, a bug id) we use:

  • access_has_global_level: checks only global access
  • access_has_project_level: also checks project overrides, plus private thresholds
  • access_has_bug_level: also checks 'limit reporters'

So far we don't have any real use case for access_has_local_level

I want to check user permission againts the user's local level. This is, the level of the user for a specific project, regardless of the user global access level.

you want to use access_has_project_level

Issue History

Date Modified Username Field Change
2018-11-30 13:18 cristobal.manrique New Issue
2018-12-04 05:46 cproensa Note Added: 0061037
2018-12-04 05:48 cproensa Note Edited: 0061037 View Revisions
2018-12-04 05:48 cproensa Assigned To => cproensa
2018-12-04 05:48 cproensa Status new => resolved
2018-12-04 05:48 cproensa Resolution open => no change required