02-10-2017 09:28 AM
Hello,
I use an alfresco 4.2.f and the application Mobile (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:
If I add the evaluator it doesn't work anymore ... Actually, the second profile is not available ...
I followed the recommendations of Alfresco to distinguish the profiles according to the users (Setting profile availability | Alfresco Documentation )
Would anyone have an idea?
thank you
/Company Home/Data Dictionary/Mobile/configuration.json
{
"info":{
"schema-version":0.2
},
"repository":{
"share-url": "https://pre-docs.poitou-charentes.fr/share"
},
"profiles":{
"Default":{
"default":true,
"label-id":"Custom Default",
"description-id":"Default profile",
"root-view-id":"views-menu-default"
},
"test":{
"label-id":"Custom test",
"description-id":"test profile",
"evaluator":"isTestUser",
"root-view-id": "views-menu-test"
}
},
"evaluators": {
"isTestUser": {
"type": "org.alfresco.client.evaluator.isTestUser",
"params": {
"users": [
"monutilisateur"
]
}
}
},
"view-groups":[
{
"id":"views-menu-default",
"label-id":"Default Menu",
"items":[
{
"id":"view-repository-default",
"label-id":"Repository",
"type":"org.alfresco.client.view.repository"
},
{
"id":"view-local-default",
"label-id":"Local Files",
"type":"org.alfresco.client.view.local"
}
]
},
{
"id":"views-menu-test",
"label-id":"test Menu",
"items":[
{
"id":"view-repository-test",
"label-id":"test repository",
"type":"org.alfresco.client.view.repository"
},
{
"id":"view-local-test",
"label-id":"test Local Files",
"type":"org.alfresco.client.view.local"
}
]
}
]
}
02-13-2017 11:23 AM
I found the solution !
In one hand you have to use the evaluator "isUser" NOT LIKE in the alfresco official docs !
In the other hand becareful with the case sensitive of the users (it's "user name" not First or Lastname)
The following code works :
{
"info":{
"schema-version": 0.2
},"repository":{
"share-url": "https://localhost/share"
},
"features":[
{
"id": "feature-analytics-default",
"type": "org.alfresco.client.feature.analytics",
"enable": false
}
],"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 users",
"description-id": "Mes Users Dashboard",
"root-view-id": "views-menu-testusers",
"evaluator": "isTestUser"
}
},
"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"
}
}
},
"evaluators": {
"isTestUser": {
"type": "org.alfresco.client.evaluator.isUser",
"params": {
"users": [
"myusername1", "myusername2"
]
}
}
}
}
02-13-2017 11:23 AM
I found the solution !
In one hand you have to use the evaluator "isUser" NOT LIKE in the alfresco official docs !
In the other hand becareful with the case sensitive of the users (it's "user name" not First or Lastname)
The following code works :
{
"info":{
"schema-version": 0.2
},"repository":{
"share-url": "https://localhost/share"
},
"features":[
{
"id": "feature-analytics-default",
"type": "org.alfresco.client.feature.analytics",
"enable": false
}
],"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 users",
"description-id": "Mes Users Dashboard",
"root-view-id": "views-menu-testusers",
"evaluator": "isTestUser"
}
},
"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"
}
}
},
"evaluators": {
"isTestUser": {
"type": "org.alfresco.client.evaluator.isUser",
"params": {
"users": [
"myusername1", "myusername2"
]
}
}
}
}
Explore our Alfresco products with the links below. Use labels to filter content by product module.