How to grant access permissions on app created with "app within minutes"?

Hi,
How can I grant access permissions to add new entries in application created with “app within minutes”?

When I give access right in the space “Data”, the user can edit or remove, but not add new entries.

The user can only add new entries if they receive access permissions directly in the “app within minutes”. But in this way the user can delete the entire application in the event of an error.

How to solve it, please?

Thank you in advance,
Julio

What happens when the user tries to add new entries? Does the user see the “Add Entry” link? I checked the App Within Minutes (latest) code and it seems to check rights on the “data” space https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-ui/src/main/resources/AppWithinMinutes/LiveTableViewSheet.xml#L67 . But note that the latest version of App Within Minutes doesn’t generate the “Data” space anymore (it uses the application space by default and you can configure the “data” space as you like). Either you have an older version of XWiki or an application created with an older version of App Within Minutes.

Hope this helps,
Marius

Hi Marius,

I have now verified that the user can add an entry (if he knows the link), but he can not see the “Add Entry” link.

By analyzing the code you passed to me, I think maybe this is because there is no “TemplateProvider” document under Code.
Under the Code document there is only the Class, Sheet, Template and Translations. How can I create it?

We use version 7.4.4 of xwiki. I can not update the xwiki version at this time.

Regards,
Julio

Then we need to look at the code from this version 7.4.4. The code I indicated is from the latest version. The template provider page is generated in the recent versions so it’s normal that you don’t have it. The code for your version is this https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-7.4.4/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-ui/src/main/resources/AppWithinMinutes/LiveTableViewSheet.xml#L55 . It checks edit right on the “data” space which is specified by the “dataSpace” property of the AppWithinMinutes.LiveTableClass object from the application home page. The “dataSpace” property is normally set in your version to the “Data” nested space within the application space. So setting edit right on this nested Data space should make the “Add entry” link visible.

Hi Marius,
I found the property “dateSpace”, but I could not find the value of it (see figure 1).

As I know that the pages of my application are created in the space “Data” I put the permission of Admin and Edit in space, but even so did not appear the link “Add new Entry” to the user. If you can help me more, I’ll be grateful.

In order to get around the problem, I manually created a provider template (figure 2) pointing to “PGEEventos.Code.PGEEventosTemplate”, so the user, when positioning himself in the “Data” space, can create an application page (figure 3).

figures

Best regards,
Julio