how row-level security works?

Topics related to running, modifying, or working with the Broadleaf Commerce Demo application

Moderator: jocanas

Shree
Newbie
Newbie
Posts: 9
Joined: Sun Sep 13, 2015 3:01 pm

Re: how row-level security works?

Postby Shree » Wed Sep 16, 2015 2:34 am

yes it is extended from ProductImpl.... for your reference here is my implementation


@Entity
public class MyProduct extends ProductImpl {

@ManyToOne(targetEntity = StoreImpl.class)
protected Store store;

public Store getStore() {
return store;
}

public void setStore(Store store) {
this.store = store;
}

}
Thanks & Regards
Shripad S. :)

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

Re: how row-level security works?

Postby phillipuniverse » Wed Sep 16, 2015 6:26 am

I see the problem, this is a dumb mistake on my part. The RowLevelSecurityProvider interface should be this:

Code: Select all

public Class<? extends Serializable> getFetchRestrictionRoot(...)


But instead it's too specific and you can't do what I intended by returning a class that extends serializable. This is a bug, what version of Broadleaf are you on?

By the way, I think a valid workaround is to do this:

Code: Select all

public Class<Serializable> getFetchRestrictionRoot(AdminUser currentUser, Class<Serializable> ceilingEntity, List<FilterMapping> filterMappings) {
        return (Class<Serializable>) new MyProduct().getClass();
}


You'll have a warning but I think it will work at runtime. Please let me know.

Shree
Newbie
Newbie
Posts: 9
Joined: Sun Sep 13, 2015 3:01 pm

Re: how row-level security works?

Postby Shree » Thu Sep 17, 2015 3:02 am

I am working on 4.0.0

now i am getting this..
inconvertible types
[ERROR] required: java.lang.Class<java.io.Serializable>
[ERROR] found: java.lang.Class<capture#1 of ? extends com.mycompany.core.adminproduct.domain.MyProduct>
[ERROR] -> [Help 1]
Thanks & Regards
Shripad S. :)

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

Re: how row-level security works?

Postby phillipuniverse » Thu Oct 22, 2015 11:49 pm


georgiamenzel
Newbie
Newbie
Posts: 5
Joined: Mon Jun 06, 2016 4:34 am

Re: how row-level security works?

Postby georgiamenzel » Mon Jun 06, 2016 4:53 am

Row Level Security enables customers to control access to rows in a database table based on the characteristics of the user executing a query.it simplifies the design and coding of security in your application.It providing restriction on accessing data from database.we can get more security by reducing the surface area of security system Custom essay writing service Providing best services for their customer

georgiamenzel
Newbie
Newbie
Posts: 5
Joined: Mon Jun 06, 2016 4:34 am

Re: how row-level security works?

Postby georgiamenzel » Mon Jun 06, 2016 4:55 am

Row Level Security enables customers to control access to rows in a database table based on the characteristics of the user executing a query.it simplifies the design and coding of security in your application.It providing restriction on accessing data from database.we can get more security by reducing the surface area of security system Custom essay writing service Providing best services for their customer


Return to “Broadleaf Commerce Demo”

Who is online

Users browsing this forum: No registered users and 2 guests