Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile availability for specified users #419

Closed
Denz86 opened this issue Feb 13, 2017 · 1 comment
Closed

Profile availability for specified users #419

Denz86 opened this issue Feb 13, 2017 · 1 comment

Comments

@Denz86
Copy link

Denz86 commented Feb 13, 2017

Hello,
I use an alfresco 4.2.f and the Mobile application (android).

I would like to set up a menu based on the users (obviously it isn't possible to use users' group)

I created 2 profiles:

  • Default
  • test

If I add the evaluator, test profile doesn't work anymore...

I followed the recommendations of Alfresco to distinguish the profiles according to the users (http://docs.alfresco.com/5.2/references/mobile-config-access.html),
I thought there was an error in the documentation using "org.alfresco.client.evaluator.isSalesUser" instead of "org.alfresco.client.evaluator.isUser" but neither of them works..

Would anyone have an idea?

Secondly, is it possible to have a default profile for different users (or better groups) ?

thank you

/Company Home/Data Dictionary/Mobile/configuration.json

{
	"info":{
		"schema-version": 0.2
	},

	"repository":{
		"share-url": "https://docs.localhost/share"
	},

	"profiles":{
		"Default":{
			"default": true,
			"label-id": "Default Profile",
			"description-id": "Description of the Default Profile",
			"root-view-id": "views-menu-default"
		},
		"TestUsers":{
			"label-id": "Mes utilisateurs",
			"description-id": "Mes utilisateurs Dashboard",
			"root-view-id": "views-menu-testusers"
		}
	},		
	
	"views" : {
		"views-menu-default":{		
			"label-id":"Repository",
			"type":"org.alfresco.client.view.repository"			
		},
	
		"views-menu-testusers":{
			"label-id": "Vue test",
			"type": "org.alfresco.client.view.activities",
			"params": {
				"siteShortName": "swsdp"
			},
			"evaluator": "isTestUser"
			
		}
	},
	
	"evaluators": {
		"isTestUser": {
			"type": "org.alfresco.client.evaluator.isTestUser",		
			"params": {
				"users": [
					"myloginuser"
				]
			}
		}
	}
}

Same question an Alfresco Forum : https://community.alfresco.com/message/807674-mobile-profile-availability-for-specified-users

@Denz86
Copy link
Author

Denz86 commented Feb 13, 2017

Ok I found the solution, there is a mistake in the Alfresco documentation example:
You have to use the "isUser" evalutor not something like "EvaluatorName"

"evaluators": {
    "isSalesUser": {
      "type": "org.alfresco.client.evaluator.isUser",
      "params": {
        "users": [
          "username1",
          "username2",
          "username3"
        ]
        }
   }
}

instead of

"evaluators": {
    "isSalesUser": {
      "type": "org.alfresco.client.evaluator.isSalesUser",
      "params": {
        "users": [
          "JohnNewton",
          "HelenMullally"
          "Mike Hatfield"
        ]
      }
    }

There is others little mistakes:

  • I think that username with white space is forbidden (Mike Hatfield) (be careful of case sensitive)
  • miss coma after "HelenMullally"
  • miss }

@Denz86 Denz86 closed this as completed Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant