Comments (7)
Update!
Is it possible to pass user name and password in the GET request to avoid basic authentication from Alfresco server?
This has been achieved by using proxy module and using alfresco's user name and passwords for each user in odoo. Now, each Odoo user has fields to hold alfresco's login details that are passed into proxy module.
For the second point, still trying to find a solution... Lets see.
from alfodoo.
Please how do I make use of the proxy to achieve the odoo user authentication.
from alfodoo.
@cshardey The proxy is an addon that forward the requests from the alfodoo widget to alfresco by using a specific alfresco user configued on the cmis_backend. To use it, you just need to install it and configure the cmis backend.
from alfodoo.
from alfodoo.
@go4site
1. Is it possible to pass user name and password in the GET request to avoid basic authentication from Alfresco server? Some thing as described in Alfresco's web scripts.
GET /alfresco/s/api/login?u={username}&pw={password?}
I hope this way we can avoid browser base "basic authentication" by setting user names and passwords for each Odoo's user.
Is it really safe to put the password into an HTTTP GET request....
It's also possible to put in place an SSO to avoid multiple authentication but it's a lot of work.
1. In the crm.lead, i want to automate creation of folders when a new opportunity is created with below flow: 2. Folders needs to be created without "Create folder in DMS" button. 3. Two folders one for Sale and other for Design department with group level access rights on each. Like Sales and Design should be able to view each other's folders but have write/delete access on their respective folders. Is there any possibility to define such template?
We already have implemented such requirements for our customers. Alfodoo wth cmislib provides the apis to put in place these functionalities. For example, if you want to automatically create the folder when an instance of a model is created you just need to write something like:
@api.model
def create(self, vals):
res = super().create(vals)
self._fields['cmis_folder'].create_value(res)
return res
from alfodoo.
@lmignon Thanks for the detailed response.
Actually, what i wanted was to automatically create a folder on odoo record creation (Project task in our case) for each department in our company. Like Sales, Design, Production etc.
Also, it was important to give ownership/permissions on folders and files to individual odoo users instead of a single user created in CMIS backend.
Good news is that somehow, this has already been achieved by doing some hacks.
-
Manual Mapping of Alfresco Users with Odoo:
-
First, users are created in alfresco with their groups. Like a group "Sales Department" having user accounts associated with it.
We added new username and password fields in Odoo's user form to hold account info created in alfresco. So, now each Odoo user has account details to be used for alfresco. -
By hacking username and password in cmis_web_proxy module:
@api.model
@tools.cache('backend_id')
def get_proxy_info_by_id(self, backend_id):
backend = self.get_by_id(backend_id)
return {
'is_cmis_proxy': backend.is_cmis_proxy,
'apply_odoo_security': backend.apply_odoo_security,
'username': backend.username,
'password': backend.password,
'proxy_location': backend.proxy_location,
'location': backend.location,
'cmis_repository': backend.get_cmis_repository()
}
We replaced backend.username and backend.password with our newly created fields in user's form.
By doing this, now content is created/edited with the ownership of currently logged in Odoo user and Not with one in cmis backend.
- Auto creation of Folders on Odoo's record creation
"Create folder in DMS" was automated using:
var view = this.getParent();
if(!value && view.activeActions.edit == true){
this.on_click_create_root();
}
We are able to create default folder structure. For this we tried something in the form widget as below:
set_root_folder_id: function (folderId) {
var self = this;
if (self.root_folder_id === folderId) {
return;
}
self.root_folder_id = folderId;
$.when(self.cmis_session_initialized, self.table_rendered).done(function () {
self.load_cmis_repositories().done(function () {
self.reset_breadcrumb();
self.display_folder(0, self.root_folder_id);
// change by rida
var cmis_session = self.cmis_session;
cmis_session
.getChildren(self.root_folder_id, '')
.ok(function (data) {
if(data.numItems == 0){
var sales_folder = '1. Sales';
var designer_folder = '2. Graphic Design';
var production_folder = '3. Production';
var qa_folder = '4. Quality Control';
var shipping_folder = '5. Shipping';
cmis_session.createFolder(folderId, sales_folder).ok(function (new_cmisobject) {
var cmis_node_create = self.getParent().trigger('cmis_node_created', [new_cmisobject]);
self.refresh_datatable();
});
cmis_session.createFolder(folderId, designer_folder).ok(function (new_cmisobject) {
var cmis_node_create = self.getParent().trigger('cmis_node_created', [new_cmisobject]);
self.refresh_datatable();
});
cmis_session.createFolder(folderId, production_folder).ok(function (new_cmisobject) {
var cmis_node_create = self.getParent().trigger('cmis_node_created', [new_cmisobject]);
self.refresh_datatable();
});
cmis_session.createFolder(folderId, qa_folder).ok(function (new_cmisobject) {
var cmis_node_create = self.getParent().trigger('cmis_node_created', [new_cmisobject]);
self.refresh_datatable();
});
cmis_session.createFolder(folderId, shipping_folder).ok(function (new_cmisobject) {
var cmis_node_create = self.getParent().trigger('cmis_node_created', [new_cmisobject]);
self.refresh_datatable();
});
}
});
});
});
},
Conclusion:
We are having an integrated document system with Odoo with below features.
- For every Project Task, each department has it's own document folder. No one is allowed to edit/delete these folders.
- Within all folders, our employees can view and download but can not edit or delete any file that they don't own. This mean each Odoo user is mapped with a user created in Alfresco.
All permissions are handled on Site level using Groups.
Thanks again for sharing such a robust and useful solution to the community!
from alfodoo.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
from alfodoo.
Related Issues (20)
- How to configure attachment from filestore >> Alfresco HOT 1
- Owncloud / Nextcloud HOT 6
- Buttons not displayed after "Create folder in DMS" HOT 4
- Drag and drop folders and dowload entire folder HOT 5
- Authentication HOT 1
- cmis_folder field not appear correctly on open from many2many field HOT 4
- Administrateur mode action error : could not find client action "mail.chat.instant_messaging" HOT 1
- Alfresco Content Services 6.1 HOT 2
- Default Folder for CMIS Field HOT 2
- OpenKM result Path with sanitize HOT 2
- Error raised when clicking on button "Create Folder in DMS" HOT 1
- After Creating multiple Cmis Backends, got singleton error HOT 1
- How do you manage different environments? HOT 1
- CMIS Module seems missing ? HOT 1
- cmis_folder doesn't work with related field type HOT 1
- Error HOT 1
- Extend the cmis_field addon with a new field CmisDocument HOT 2
- Extend the cmis_web addon with a widget that contrary to the cmis_folder widget can be added to either a form or a list view HOT 2
- Alfodoo v11, alfresco icons not showing in Odoo 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfodoo.