Creating a New Role & set of permissions

Developer
Anonymous
2010-11-11
2012-09-14
  • Anonymous - 2010-11-11

    Hi, I am trying to create a new role with a different set of permissions in
    version 1.7

    The new role is 'Contractor' and so far I have added this to the role table in
    the database as a new line,

    RoleID: 8

    RoleName: Contractor

    RoleHandle: contractor

    RoleLevel: Person

    RoleSequence: 50

    This change allowed me to see this new role and select it when adding a new
    person so all good so far. I then went to the Permissions list and go to
    create a new permission but this Role is missing, I just have the standard
    ones.

    I then looked within the security directory and edited the permission.php file
    to add contractor within the following line,

    $TPL = page::select_options(array("god", "admin", "manage", "employee",
    "contractor"), $permission->get_value("roleName"));

    But I still don't get the 'contractor' option in the dropdown when creating a
    new role so I must be missing a change somewhere. Can anyone shed some light
    on any other files I need to modify to include 'contractor' as a new role.

    Thanks........Justin

    P.S. The goal here is to create a role type for external contractors we use so
    that we can lock down their access a little more than employees.

     
  • Anonymous - 2010-11-11

    Sorry just to clarify, after making these changes I can select contractor when
    adding a new person but do not see contractor in the list of roles available
    when creating a new permission.

     
  • Con Zymaris

    Con Zymaris - 2010-11-11

    Hi Justin,

    this, on the face of it, sounds like a bug. We'll need to investigate and
    report back.

     
  • Anonymous - 2010-11-12

    I'm guessing there may need to be another php file I need to modify other than
    permission.php within the security directory but I don't know how I would find
    it. It was a bit of guesswork and a clear directory structure that led me to
    that one.

     
  • Con Zymaris

    Con Zymaris - 2010-11-14

    Justin,

    this may be the case, but I'll need to confer with the dev team for clarity on
    this one.

    -- Con

     
  • Con Zymaris

    Con Zymaris - 2010-11-19

    Justin,

    I've discussed this with the team and they offer the following information

    1) The believe that your code change should work, and have in fact tested it
    successfully here. Is it possible that the problem you experienced was in fact
    an artifact of stale browser data? Can you re-try with a clean page relaod?

    2) What you're trying to do is a legitimate use case, but one allocPSA doesn't
    really support at current. It would allow for, say, creating a new class of
    users who could edit tasks but not projects. This is in essence not a bug,
    per-se, but a new feature request.

    We're therefore happy to consider incorporating this functionality, assuming
    you'd like to code it.

    -- Con

     
  • Anonymous - 2010-11-22

    Hi, I checked it wasn't a cache issue. I still don't see contractor listed in
    the 'Role Name' drop-down when editing or creating a new permission but I will
    ask our guys to look into the code and if implemented share this with the
    community.

    Tks......Justin

     
  • Con Zymaris

    Con Zymaris - 2010-11-22

    Justin,

    interesting outcome. The code mods you applied seemed to work at our end.

    Let us know how your team goes with this.

    All the best.

    -- Con

     
  • Con Zymaris

    Con Zymaris - 2010-12-03

    Hi Justin,

    any updates on this issue?

    -- Con

     
  • Anonymous - 2011-01-12

    Working on a few other pieces at the moment, the contractor profile is
    scheduled to be looked at by the end of this month hopefully.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks