How to retrieve user power 'Create Projects'

Hi all,

I am writing a DXL that checks if the account settings of our user accounts are correct, i.e. as defined in a set of roles. Everything is done now except one little thing: How can you get the Power 'Create Projects' for the user account? There is no proptery like 'mayCreateProjects' for the user object in the DXL Help. The user Type is 'Custom' for some of the roles, so just checking the user Type does not solve the issue.

Any hints how to retrieve this information would be highly appreciated.

best regards,

Michael


michael42 - Fri Oct 18 05:08:36 EDT 2013

Re: How to retrieve user power 'Create Projects'
llandale - Fri Oct 18 11:52:57 EDT 2013

mayCreateTopLevelFolders

  • User usr
  • string Name
  • bool MayProj
  • for usr in userList do
  • {  Name = usr.name
  •    MayProj = usr.mayCreateTopLevelFolders
  •    print Name "\t" MayProj "\n"
  • }
  • // print usr.mayCreateTopLevelFolders "\n"

Sadly these "user elements" must appear on right side of equal sign, they cannot be used in print or if statements directly.  The final commented out line generates a DXL interpret error.

-Louie

Re: How to retrieve user power 'Create Projects'
michael42 - Mon Oct 21 03:11:20 EDT 2013

llandale - Fri Oct 18 11:52:57 EDT 2013

mayCreateTopLevelFolders

  • User usr
  • string Name
  • bool MayProj
  • for usr in userList do
  • {  Name = usr.name
  •    MayProj = usr.mayCreateTopLevelFolders
  •    print Name "\t" MayProj "\n"
  • }
  • // print usr.mayCreateTopLevelFolders "\n"

Sadly these "user elements" must appear on right side of equal sign, they cannot be used in print or if statements directly.  The final commented out line generates a DXL interpret error.

-Louie

Dear Louie,

thank you, that did the job. I was aware of the strange behavior of the properties, What I was missing was that 'mayCreateTopLevelFolder' maps to 'Create Project'. One more thing in the highly illogical world of DXL to keep in mind.

Thanks again.

Michael

Re: How to retrieve user power 'Create Projects'
llandale - Mon Oct 21 09:15:24 EDT 2013

michael42 - Mon Oct 21 03:11:20 EDT 2013

Dear Louie,

thank you, that did the job. I was aware of the strange behavior of the properties, What I was missing was that 'mayCreateTopLevelFolder' maps to 'Create Project'. One more thing in the highly illogical world of DXL to keep in mind.

Thanks again.

Michael

Well, DXL language does seem to "march to a different drummer".