Re: [xwiki-devs] [Contrib] : Validate the release of "xwiki-tooltip-macro"

2016-03-22 Thread Zoubir
Allright, Release done, I thought that I haven't permission to do it.

Thanks Thomas 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Contrib-Validate-the-release-of-xwiki-tooltip-macro-tp7598592p7598596.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


[xwiki-devs] [Brainstorming] Display of documents in AllDocs LT in multilingual mode

2016-03-22 Thread Vincent Massol
Hi,

This is a brainstorming aimed at fixing:
* http://jira.xwiki.org/browse/XWIKI-10384
* http://jira.xwiki.org/browse/XWIKI-12033

In addition I believe we need to support the following use cases:

* UC1: (Simple) users should be able to see documents in the currently selected 
UI language and documents with no translations
* UC2: (Advanced) users should be able to see all documents in the wiki (i.e. 
all translations + all docs with no translations)
* UC3: It could be interesting to have an option to limit the translations to 
the list of configured languages of the wiki

ATM the issues is that:
* the “currentlanguage” query filter is not implemented properly and returns 
duplicates (the default language + the translation)
* sorting can fail 
* there’s no way for an advanced users to see all translations in the AllDocs LT

Also note that Marius (who’s discovered the problem) as commented at 
http://jira.xwiki.org/browse/XWIKI-9229

There are several solutions I can imagine

Solution 1


The idea is to implement a query filter that  returns “a given language + the 
default language if there’s no translation”. It can be done, see 
http://jira.xwiki.org/browse/XWIKI-9229?focusedCommentId=90654=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-90654

Pros:
- Generic solution that would work wherever we use the query manager in the wiki
Cons:
- it’s “slow”.
- It’s also not solving UC2 and UC3.

Solution 2


When the wiki is in multilingual mode, add a “Language” column in the LT and 
display all docs having translations in one of the configured languages of the 
wiki + all docs with no translations.

The user will see duplicates but the “Language” column will indicate clearly 
that they are different translations.

Pros:
- This would fix UC3, partially UC2 and partially UC1.
Cons:
- Not a generic solution; only solves the issue for the AllDocs LT (and the 
other places where we want to do the same).

Solution 3


(initially proposed by Marius)

Have a toggle with several states somewhere in the AllDocs UI (could be outside 
of the LT) to be able to choose different results:
* Only docs in the current UI language
* Only docs that don’t have translations
* All docs
* All docs in one of the configured languages of the wiki

Note that from a wiki syntax POV, this could be a parameter in the 
{{document/}} live table.

Pros:
- This would fix UC2, UC3 and partially UC1.
Cons:
- Not a generic solution; only solves the issue for the AllDocs LT (and the 
other places where we want to do the same).

Solution 4
=

Modify the DB schema and add a column in the xwikidocs table to indicate if a 
doc has translations. This would mean updating it when a new translation is 
created and when a translation is removed.

Pros:
- Fast query
- Generic solution that will work with any query using the query manager
Cons:
- Requires a DB update

Conclusion
=

Solution 4 seems to be the only real generic solution.

WDYT? Any other idea?

Thanks
-Vincent

___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] [Contrib] : Validate the release of "xwiki-tooltip-macro"

2016-03-22 Thread Thomas Mortagne
You should read the part starting with "Alternatively if you've been
granted the permissions you can do this yourself" in
http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HReleasetheproject
;)

On Tue, Mar 22, 2016 at 5:16 PM, Zoubir  wrote:
> Hello Devs,
>
> Could you please,  validate my release of the "xwiki-tooltip-macro".
>
> Thanks,
> Zoubir
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Contrib-Validate-the-release-of-xwiki-tooltip-macro-tp7598592.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> ___
> devs mailing list
> devs@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] How to setup 'Prevent unregistered users from viewing pages' in config or programmatically?

2016-03-22 Thread abtv
Yes, I have found this API and
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DsXWikiPreferences too.
The problem is I don't understand what to pass to getProperty as params.

You wrote:
bridge.setProperty(, , "authenticate_view", 1); 

The following returns null:
documentAccessBridge.getProperty("XWiki.XWikiPreferences[0]",
"XWiki.XWikiPreferences[0]", "authenticate_view");

Could you write what I should pass to getProperty method, please? And to
prevent future questions what should I read to solve such problems?






--
View this message in context: 
http://xwiki.475771.n2.nabble.com/How-to-setup-Prevent-unregistered-users-from-viewing-pages-in-config-or-programmatically-tp7598565p7598593.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


[xwiki-devs] [Contrib] : Validate the release of "xwiki-tooltip-macro"

2016-03-22 Thread Zoubir
Hello Devs,

Could you please,  validate my release of the "xwiki-tooltip-macro".

Thanks,
Zoubir



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Contrib-Validate-the-release-of-xwiki-tooltip-macro-tp7598592.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


[xwiki-devs] [Contrib] Request repository for permission macro

2016-03-22 Thread Mohamed Boussaa
Hello devs,

I'd like a repository on xwiki-contrib and a Jira project for the
permission macro (name of the repo: macro-permission).

The Permission macro allow the content to execute based on whether the user
has the permission to do so.

It is based on this task:
http://jira.xwiki.org/browse/XWIKI-12650?filter=10534

Thanks,

Mohamed
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] How to setup 'Prevent unregistered users from viewing pages' in config or programmatically?

2016-03-22 Thread Sergiu Dumitriu
Yes, using the standard APIs for interacting with documents.

XWikiDocument doc = xcontext.getWiki().getDocument(, xcontext);
doc.setIntValue(,
"authenticate_view", 1);
doc.setIntValue(,
"authenticate_edit", 1);
xcontext.getWiki().saveDocument(doc, xcontext);


Or, shorter and without using the deprecated old core APIs:

@Inject
private DocumentAccessBridge bridge;
...
bridge.setProperty(, , "authenticate_view", 1);


On 03/22/2016 03:33 AM, abtv wrote:
> It's good idea, but I would prefer to use java code in xwiki instead of REST
> call from outside of xwiki. Is it possible?
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs


Re: [xwiki-devs] How to setup 'Prevent unregistered users from viewing pages' in config or programmatically?

2016-03-22 Thread abtv
It's good idea, but I would prefer to use java code in xwiki instead of REST
call from outside of xwiki. Is it possible?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/How-to-setup-Prevent-unregistered-users-from-viewing-pages-in-config-or-programmatically-tp7598565p7598586.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
___
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs