Hi devs,
Recently we've done a big work of converting the old $msg into $services.localization or {{translation/}}.
Every time we've done that in a module we need to add a dependency in its pom on the appropriate localization module.
I haven't checked fully if we've done this or not but it's possible that some functional tests don't fail because they don't test everything so we need to review the POMs.
Thanks
-Vincent
Hi All,
I'm trying to do the following task without any success.
Getting a list of documents of a specific Blog Category (Let's say Category
"C"). After getting all documents of "C", then getting from each document
the "Summary" field.
Would it be possible to lead me on how to do this task in Velocity?
Any help will be strongly appreciated.
ps. I'm working on Google Map extension for supporting several positions; I
will push it as soon as I finish it.
Best wishes
Youcef
Hi devs,
While introducing the new security module, we have added a new right named
"creator", only applicable at document level, it is automatically applied
on documents for their creator. This right is not really checked for
itself, but it imply the delete right with a tie resolution policy of
allow, and a inheritance policy of not deniable. This give a document
creator the right to delete the document whatever other policies could say
about him.
Since having only delete right on a document does not seems really logical,
I am wondering if it would not be good to make the creator right also imply
the view, and the edit right. This would give to document creators
consistant minimal right on their documents, what ever the policy of the
wiki is.
WDYT ?
--
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO
As discussed a while ago, I'm finally made public the Mobile XWiki Client
code I've been working on.
I've transfered the repository as well as the mobile skin repository to
xwiki-contrib
https://github.com/xwiki-contrib/mobile-standardxwikiclienthttps://github.com/xwiki-contrib/skin-mobile-simple
The next step for the mobile client is a rework to be:
1/ More modular to allow for additional module and UI changes to allowed by
plugins.
2/ A rework of the network layer to be able to queue requests to XWiki and
manager errors and retries as well as login.
Ludovic
--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hello,
first I would like to say thank you for your reply, and tell you I use XEM
4.0.
I use the code bellow to authorize a user and the same time to assign in a
group, if he/she doesn't exist. The problems is when the code performs the
assignment in a group, since you are not logged in, you are a XWikiGuest,
the group page have to have explicit rights (edit) for the guest.
/**
*
* @author jdurancal
*/
@Component
public class LTIAuthServiceImpl extends XWikiAuthServiceImpl {
@Override
public Principal authenticate(String username, String password,
XWikiContext context) throws XWikiException {
XWikiServletRequest request = (XWikiServletRequest)
context.getRequest();
if (!context.getAction().equalsIgnoreCase("logout")) {
try {
LTIEnvironment LTIEnvironment = new LTIEnvironment(request);
if (LTIEnvironment.isAuthenticated()) {
String usernameLTI = LTIEnvironment.getUserName();
if (usernameLTI.contains(":")) {
usernameLTI = usernameLTI.split(":")[1];
}
// get the group to assigna to the user.
String group =
LTIEnvironment.getParameter("custom_groups");
return syncUser(usernameLTI, group, context,
LTIEnvironment.isInstructor());
} else {
Exception lastException =
LTIEnvironment.getLastException();
System.out.println("Error LTI authentication " +
(lastException != null ? lastException.getMessage() : ""));
}
} catch (Exception ex) {
System.out.println("Execption authentication " + ex);
}
}
// Fallback on standard XWiki authentication
return super.authenticate(username, password, context);
}
/**
* Creates the user if he doesn't exist in the XWiki repository. User is
assigned
* to the default XWikiAllGroup
* @param user
* @param context
* @throws com.xpn.xwiki.XWikiException
*/
protected Principal syncUser(String user, String groupName, XWikiContext
context, boolean isInstructor) throws XWikiException {
String xwikiUser = super.findUser(user, context);
String wikiNameShow = context.getDatabase();
System.out.println("["+wikiNameShow+"] usernameLTI="+user+",
GroupsLTI:"+groupName);
if (xwikiUser == null) {
System.out.println("["+wikiNameShow+"] LTI Create user: User " +
user + " does not exist");
String wikiname = context.getWiki().clearName(user, true, true,
context);
context.getWiki().createEmptyUser(wikiname, "edit", context);
System.out.println("["+wikiNameShow+"] LTI Create user: User " +
user + " has been created");
xwikiUser = "XWiki."+user;
// if the user is "instructor", assign admin rights except in
speakapps wiki
if (isInstructor &&
!context.getWiki().getName().equalsIgnoreCase("speakapps")) {
try {
this.addUserGroup(xwikiUser, user, "XWikiAdminGroup",
context);
}catch(Exception ex) {
System.out.println("["+wikiNameShow+"] Execption adding
admin user "+ex);
}
}
}
// És un group però no és l'administrador
if (groupName != null &&
!groupName.equalsIgnoreCase("XWikiAdminGroup")) {
try {
this.addUserGroup(xwikiUser, user, groupName, context);
}catch(Exception ex) {
System.out.println("["+wikiNameShow+"] Execption adding user
a \""+groupName+"\" group "+ex);
}
}
return new SimplePrincipal(context.getDatabase() + ":" + xwikiUser);
}
private boolean addUserGroup(String xwikiUser, String user, String
groupName, XWikiContext context) throws XWikiException {
boolean isAdded = false;
Group group = Group.getGroup("XWiki", groupName, context);
if (group != null && !group.isMember(xwikiUser, context)) {
if (group.addUser(user, context)) {
group.save(context);
isAdded = true;
System.out.println("["+context.getDatabase()+"] add a
\""+groupName+"\" member " + xwikiUser);
}
}
return isAdded;
}
}
Best regards.
--
View this message in context: http://xwiki.475771.n2.nabble.com/How-to-add-a-user-to-a-group-programmatic…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
The XWiki development team is proud to announce the availability of
XWiki 5.0 Milestone 2.
This release introduces some important changes like the new security
module by default, XWiki is now always in virtual mode, JQuery is
embedded by default, xwiki/1.0 syntax is now disabled and lots of
other improvements.
You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download
Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki50M2
Thanks
-The XWiki dev team
Hello everybody,
I have created a Test Reporting Application in order to make the Manual
Testing Plan more easily to follow and execute.
The rationale behind this is:
* Hard to update a monolith page with all the manual tests performed
* When someone who is testing is updating the page, no other user can
update the page
* It allows existing manual cases to be marked as automated (if we have an
automated tests for them)
* Easier to follow, track over what has been tested and what not
Since I'd like to propose this to be used in the XWiki community for our
Manual Test cases, I have put a live version on Incubator along with some
test cases so I can get your suggestions before putting it in actual
production/usage. I'm sure you will have some cool suggestions on how to
improve it even further. So give it a try. I have also added a suggestions
page linked form the application homepage.
Note that the application was designed to be generic, so everybody can use
it in their own software project.
Contrib repo: https://github.com/xwiki-contrib/application-testreporting
Incubator Live version:
http://incubator.myxwiki.org/xwiki/bin/view/QA/WebHome
Suggestions page: http://incubator.myxwiki.org/xwiki/bin/view/QA/Suggestions
Looking forward to get your feedback !
Regards,
Sorin B.