Re: Ofbiz Security permission

2019-02-28 Thread Deepak Nigam
Hi Thanh,

The permissions you are looking for and corresponding security group are
already available OOTB. You only need to associate user login with
appropriate security groups. Following entities can be of your interest:

1) SecurityPermission
2) SecurityGroup
3) SecurityGroupPermission
4) UserLogin
4) UserLoginSecurityGroup

It can be also achieved via 'Party Manager' application. Just open the
profile of the party and you can add/remove him to any security group. This
feature is available under 'User Name(s)' section.

Thanks & Regards
--
Deepak Nigam


On Fri, Mar 1, 2019 at 2:58 AM Jacques Le Roux 
wrote:

> Hi Thanh,
>
> Your message has been moderated.
>
> Please subscribe to the user ML for such questions and then use your email
> client
> See also why here http://ofbiz.apache.org/mailing-lists.html
>
> You will get a better support , it's more fair to share with everybody
> and people can answer you directly on the ML rather than directly to you
> The wider the audience the better the answers you might get
>
> Also it's more work for moderators who have to accept your messages as
> long as you have not subscribed.
> I'll personally no longer accept them (other moderators still could)
>
> Thanks
>
> Jacques
>
> Le 28/02/2019 à 19:01, thanh a écrit :
> > Hi all,
> >
> > I am newbie in ofbiz,
> >
> > I want to create permission call "Salesman", which this permission, user
> can
> > create sale order, view and edit own sale order. Cannot update or view
> other
> > sale order which is not belong to themself.
> >
> > How can I do it, please show me.
> >
> > Thanks and best regards.
> > Thanh
> >
> >
> >
> > --
> > Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-Dev-f165671.html
> >
>


Re: Ofbiz Security permission

2019-02-28 Thread Jacques Le Roux

Hi Thanh,

Your message has been moderated.

Please subscribe to the user ML for such questions and then use your email 
client
See also why here http://ofbiz.apache.org/mailing-lists.html

You will get a better support , it's more fair to share with everybody  and 
people can answer you directly on the ML rather than directly to you
The wider the audience the better the answers you might get

Also it's more work for moderators who have to accept your messages as long as 
you have not subscribed.
I'll personally no longer accept them (other moderators still could)

Thanks

Jacques

Le 28/02/2019 à 19:01, thanh a écrit :

Hi all,

I am newbie in ofbiz,

I want to create permission call "Salesman", which this permission, user can
create sale order, view and edit own sale order. Cannot update or view other
sale order which is not belong to themself.

How can I do it, please show me.

Thanks and best regards.
Thanh



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-Dev-f165671.html



Ofbiz Security permission

2019-02-28 Thread thanh
Hi all,

I am newbie in ofbiz,

I want to create permission call "Salesman", which this permission, user can
create sale order, view and edit own sale order. Cannot update or view other
sale order which is not belong to themself.

How can I do it, please show me.

Thanks and best regards.
Thanh



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-Dev-f165671.html


Re: [OPTIONS] Java 11 and Java JDK origin

2019-02-28 Thread Michael Brohl

+1 for Taher's suggestion.

Thanks, Michael

Am 28.02.19 um 12:32 schrieb Taher Alkhateeb:

Perhaps we can keep ofbiz 17.12 on java 8, and let 18.12 and trunk
switch to java 11 on openjdk. This might provide stability expected by
users as indicated by Michael.

On Thu, Feb 28, 2019 at 2:27 PM Jacques Le Roux
 wrote:

Hi,

During discussions in the "Oracle Java release model changes and consequences for the 
project" thread, we created "Upgrade OFBiz to use Java JDK
Version 11" aka OFBIZ-10757.

There we began to discuss not only if we should switch to Java 11 LTS (Long 
Time Support), which is obviously the best current choice, but also which
Java JDK origin we should use OOTB.

So we have few options and we should clarify what the community wants.

Options are:

  1. Do we agree to use https://adoptopenjdk.net/releases.html as Java JDK 
origin OOTB?
  2. Which branches should switch to Java1? Obviously the trunk and R18 should. 
Should R17, which is not yet released, switch also?

I hope we don't need a vote and will quickly find a consensus.

Thanks

Jacques





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Enabling HTTP/2 in the embedded Tomcat connectors

2019-02-28 Thread Jacopo Cappellato
Thank you Jacques and Taher for your review and useful comments: I have
committed this work with rev. 1854532.

Taher, I have reviewed the configuration options but I don't feel like
changing any of them by default; for now I have added a comment to the
commit about them and I will leave the implementation of the ability to set
them to a future enhancement.
As a side note, this is a good example for a valid reason to provide the
ability to run OFBiz in an external (rather than embedded) Tomcat instance
(for which all the configuration options would be available outside of
OFBiz): this would require to refactor various aspects of our framework, so
I will postpone this discussion to another day :-)

Regards,

Jacopo


On Mon, Feb 25, 2019 at 10:48 AM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> I had a look, I don't think we need to worry about those vars.
>
> If/When needed we can change defaults.
>
> Jacques
>
> Le 19/02/2019 à 19:05, Jacques Le Roux a écrit :
> > Good question, I guess most are OK, but what are Trailer Headers for
> instance?
> >
> > BTW https://tomcat.apache.org/tomcat-9.0-doc/config/http2.html is our
> reference for the trunk
> >
> > Jacques
> >
> > Le 19/02/2019 à 10:24, Taher Alkhateeb a écrit :
> >> clean and simple implementation, +1
> >>
> >> on a side note, I wonder if we need to set any of the http2 attributes
> >> listed in [1] or whether the defaults are okay.
> >>
> >> [1] https://tomcat.apache.org/tomcat-8.5-doc/config/http2.html
> >>
> >> On Mon, Feb 18, 2019 at 5:58 PM Jacques Le Roux
> >>  wrote:
> >>> Hi Jacopo,
> >>>
> >>> Sounds good to me, we can always easily revert in case of unexpected
> issue anyway
> >>>
> >>> Thanks
> >>>
> >>> Jacques
> >>>
> >>> Le 18/02/2019 à 11:43, Jacopo Cappellato a écrit :
>  Hi all,
> 
>  I think it is time to enable the instance of Tomcat that is embedded
> in
>  OFBiz to communicate using the HTTP/2 protocol, when the client
> supports it.
>  For your review, before I commit, I am pasting here the patch that
> will
>  enable it (it is quite simple) .
>  In it I have enabled HTTP/2 by default, by setting
> upgradeProtocol=true, in
>  the http and https connectors (but they will continue to support also
>  HTTP/1.1); if the new property "upgradeProtocol", that I have
> introduced
>  for this specific purpose, is not set (as it would be the case in
> custom
>  configuration files) then the new protocol will not be enabled. Does
> the
>  approach look good to you?
> 
>  Thanks,
> 
>  Jacopo
> 
>  PS: you can test it, for example, using curl:
> 
>  curl -vso /dev/null --http2 http://localhost:8080
> 
> 
>  Index: framework/catalina/ofbiz-component.xml
>  ===
>  --- framework/catalina/ofbiz-component.xml (revision 1853787)
>  +++ framework/catalina/ofbiz-component.xml (working copy)
>  @@ -99,6 +99,7 @@
> 
> 
> 
>  +
> 
> 
> 
>  @@ -128,6 +129,7 @@
> 
> 
> 
>  +
> 
> 
> 
>  @@ -183,6 +185,7 @@
> 
> 
> 
>  +
> 
> 
> 
>  @@ -194,6 +197,7 @@
> 
> 
> 
>  +
> 
> 
> 
>  Index:
> 
> framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
>  ===
>  ---
> 
> framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
>  (revision
>  1853787)
>  +++
> 
> framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
>  (working
>  copy)
>  @@ -63,6 +63,7 @@
> import org.apache.catalina.util.ServerInfo;
> import org.apache.catalina.valves.AccessLogValve;
> import org.apache.catalina.webresources.StandardRoot;
>  +import org.apache.coyote.http2.Http2Protocol;
> import org.apache.ofbiz.base.component.ComponentConfig;
> import org.apache.ofbiz.base.concurrent.ExecutionPool;
> import org.apache.ofbiz.base.container.Container;
>  @@ -417,9 +418,12 @@
> private Connector prepareConnector(Property connectorProp) {
> Connector connector = new
>  Connector(ContainerConfig.getPropertyValue(connectorProp, "protocol",
>  "HTTP/1.1"));
>  connector.setPort(ContainerConfig.getPropertyValue(connectorProp,
>  "port", 0) + 

Re: [OPTIONS] Java 11 and Java JDK origin

2019-02-28 Thread Taher Alkhateeb
Perhaps we can keep ofbiz 17.12 on java 8, and let 18.12 and trunk
switch to java 11 on openjdk. This might provide stability expected by
users as indicated by Michael.

On Thu, Feb 28, 2019 at 2:27 PM Jacques Le Roux
 wrote:
>
> Hi,
>
> During discussions in the "Oracle Java release model changes and consequences 
> for the project" thread, we created "Upgrade OFBiz to use Java JDK
> Version 11" aka OFBIZ-10757.
>
> There we began to discuss not only if we should switch to Java 11 LTS (Long 
> Time Support), which is obviously the best current choice, but also which
> Java JDK origin we should use OOTB.
>
> So we have few options and we should clarify what the community wants.
>
> Options are:
>
>  1. Do we agree to use https://adoptopenjdk.net/releases.html as Java JDK 
> origin OOTB?
>  2. Which branches should switch to Java1? Obviously the trunk and R18 
> should. Should R17, which is not yet released, switch also?
>
> I hope we don't need a vote and will quickly find a consensus.
>
> Thanks
>
> Jacques
>


[OPTIONS] Java 11 and Java JDK origin

2019-02-28 Thread Jacques Le Roux

Hi,

During discussions in the "Oracle Java release model changes and consequences for the project" thread, we created "Upgrade OFBiz to use Java JDK 
Version 11" aka OFBIZ-10757.


There we began to discuss not only if we should switch to Java 11 LTS (Long Time Support), which is obviously the best current choice, but also which 
Java JDK origin we should use OOTB.


So we have few options and we should clarify what the community wants.

Options are:

1. Do we agree to use https://adoptopenjdk.net/releases.html as Java JDK origin 
OOTB?
2. Which branches should switch to Java1? Obviously the trunk and R18 should. 
Should R17, which is not yet released, switch also?

I hope we don't need a vote and will quickly find a consensus.

Thanks

Jacques



Re: svn commit: r1854366 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java

2019-02-28 Thread Jacques Le Roux

https://issues.apache.org/jira/browse/DBCP-539

Jacques

Le 27/02/2019 à 12:29, Jacques Le Roux a écrit :

Thanks Mathieu,

Done with https://github.com/apache/commons-dbcp/pull/30

Jacques

Le 26/02/2019 à 12:37, Mathieu Lirzin a écrit :

Hello Jacques,

Jacques Le Roux  writes:


Did you report to Apache Commons DBCP? Else should we not?

No I didn't report.  I think it would be fine to report the issue that
‘ManagedDataSource’ should declare more specific exceptions than
‘Exception’ for the ‘close’ method to allow the compiler to check that
no ‘InterruptedException’ are thrown.


Le 26/02/2019 à 11:09, jler...@apache.org a écrit :

Author: jleroux
Date: Tue Feb 26 10:09:40 2019
New Revision: 1854366

URL: http://svn.apache.org/viewvc?rev=1854366=rev
Log:
Improved: no functional change

Fixes a typo in comment. I checked it's still not implemented in last DBCP 
(2.6.0)

Modified:
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java

Modified: 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java?rev=1854366=1854365=1854366=diff

==
--- 
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java
 (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/connection/DebugManagedDataSource.java Tue Feb 26 10:09:40 
2019

@@ -69,7 +69,7 @@ public class DebugManagedDataSource
Thanks.