Broadleaf Commerce User Administration Doc - broadleaf-commerce

i want to know about user permissions in broadleaf admin and how to create them ? I can't find any documentation about related user administration. Please guide me on this.
Thanks in Advance.

As of now many docs are not available in Broadleaf documentation site for the latest releases(version 3.0 being current). May be this is what you are looking for AdminUser.
There is an admin user class and an interface. The interface extends AdminSecurityContext interface. You can set and get the user roles with the following methods,
public Set<AdminRole> getAllRoles();
public void setAllRoles(Set<AdminRole> allRoles);
Edit:
http://javadocs.broadleafcommerce.com/core/6.0.0-SNAPSHOT/org/broadleafcommerce/openadmin/server/security/remote/AdminUser.html

Related

How do we programmatically create Role, Permissions in Liferay for a User and Site Template?

As a programmer, I would like to create Role and Permissions in Liferay and assign it to a User and a Site template or site without the intervention of Liferay Admin.
Please help me with the code if anybody has already done it. I am using Liferay 6.1
Liferay Provides set of api for doing create user , roles etc . You could go through below api which will create user and role also assign respected association between user, site and roles
https://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html
https://docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/RoleLocalServiceUtil.html
Thanks

Difference between Dashboard and My profile

I have been using Liferay portal. Its very easy and user friendly. Actually developer friendly ! But i have few doubts. Would want to get them clarified.
What is the difference between dashboard and my profile?
How do you restrict a user from adding portlets?
3.How to add animation effects/slideshow ?
yeah. That is all for now. Please help me get them clarified. Thanks in advance
Dashboard --> User's own Page, where user can have own set of portlets
My Profile --> Basically Users's Information Page, where user can add/edit them manually.
for more info :
User Personal Sites
The provided answer is not correct. My Profile is a page where you can add portlets. My Dashboard is a page where you can add portlets. See the difference? Neither do I. After much digging I found this:
Finally, the user section shows the users name and provides links to the user’s profile (his or her publicly-accessible pages), dashboard (his or her private pages) ...
https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/touring-liferay-portals-user-interface
So it looks like "My Profile" = publicly-accessible pages, while
"My Dashboard" = private pages. For an admin user, the dashboard appears to
contain links/portlets to manage the website, user accounts, etc.

How can I fetch the existing table data in aportlet

I am trying to create the user by site admin so I have created a portlet which has basic user details form and in the action class I called the UserLocalServiceUtil.adduser(). Now the values are inserting into the DB in USER_. Now I want to display the list of created users by only site admin how can I do that? I have the following queries.
1) How can I fetch the values from USER_ in my portlet. Do I need to create the service builder OR are there API methods to fetch the values from the USER_ table?
2) I want to display only the users list which is created by site admin in my portlet. I don't want to display the whole company list of users. So How can I achieve this?
Suggest me any references or guidelines to do this.
Your help will be very much appreciated.
For Q1 :
http://cdn.docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html#getUsers(int, int)
This might help you. You don't need service builder for that. Just create a simple Liferay MVC portlet and call the relevant methods.
for Q2 : I don't think this would be possible by API methods. What you can do is to set an expando variable for user at time of creation by site-admin. And # time of fetching users, you can cross-check the value of that field manually.
EDIT :
One more point for suggestion : Never create user with Site-Admin role for user creation. This role is supposed to manage site & user assignment to the site. You can use more appropriate role i.e. Org-Admin rather than site-Admin.
How to set an expando variable while adding the user?
Liferay provides Expando API interface, which you can use while creation of user in your portlet. refer following links Developing with Expando, Liferay Expando API
I hope this would be helpful to you.

Is there any option to register user as vendor in broadleaf

I am planning to setup an e-commerce platform on which vendors can come, register, upload and sell their products.
Want to know is there any option to register a user as a vendor in Broadleaf.
I have deployed site and admin webapp, but as of now I can't find any option for that.
Please let me know if Broadleaf commerce can be the choice of required scenario.
Thanks
You are after Multi Tenant functionality which Broadleaf offers in the Enterprise version.

Liferay - Authentication without populating liferay db

Again, Do we have any possible solution that avoid populating liferay db with user information for authentication using extending methods/custom implementation/hooks/plugins/extensions?
Regards
Vishal G
There's no way to avoid creating a user in the Liferay database. You can though create a dummy user that all users use or a dummy user for every user depending on your needs
It is generally not desirable to share accounts as you cannot benefit from all functionality regarding groups, personalization, ... This is basically why one would install a portal.
To create users you can use Liferay's services.
If authorization is not your concern, it is possible to override the authenitaction mechanism with a variety of methods. THe authentication pipeline might be a good starting point.
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/authentication-pipeline
Good luck!
You can create a Liferay Hook to Authenticate using your custimization.
override the following jsp page.
/html/portlet/login/login.jsp
Or you can create your own login portlet. No need to populate all users in db.
Just findUserById().
Dont forget to mention this change in portal-ext.properties file. You will need to specify custom Login portlet id.

Resources