Hi David

Not sure what you're asking from me Do you want me to repeat the email, or do you think the explanation in there was not clear?

/kaare

Hi Kaare,

I've raised a issue 2782 <https://github.com/ledgersmb/LedgerSMB/issues/2782> to track this.

Could you add a comment to it describing what you were trying to achieve, and what you did to make it work please.

In the meantime, is there a reason you directly used SQL to alter this?
We do have the ability to make changes to permissions from within the UI, both the main application UI and from setup.

Regards
David G


On 02/05/17 17:43, Kaare Rasmussen wrote:
Hi

lsmb 1.5.6.

I have this user who should only be allowed to enter orders and
quotations, NOT make invoices. So I set her up for order entry, order
admin and some other checkboxes (1).  But when she tries to enter the
Sales Order menu item, it fails, and there's a log entry (2).

So I granted SELECT access to ar for lsmb_jasonic__base_user. Should
probably have been one of the order roles, but I didn't have time to
reflect too much over this.

Not sure if this is my installation only, or a general problem.

After having created a sales order, the user has a Sales Invoice button.
I didn't test it, but anyway, it shouldn't be shown as an option for
this user. Is this an lsmb error, or due to one of the granted roles?

Also, I wonder about some of the roles, not sure I can find the
equivalent button in the user setup. Exchange rates?  Timecard?

(1) List of groups the user is a member of:

   lsmb_jasonic__base_user
   lsmb_jasonic__exchangerate_edit
   lsmb_jasonic__file_read
   lsmb_jasonic__contact_read
   lsmb_jasonic__contact_class_customer
   lsmb_jasonic__sales_order_create
   lsmb_jasonic__sales_order_edit
   lsmb_jasonic__sales_order_delete
   lsmb_jasonic__sales_quotation_delete
   lsmb_jasonic__sales_quotation_create
   lsmb_jasonic__sales_order_list
   lsmb_jasonic__sales_quotation_list
   lsmb_jasonic__timecard_list
   lsmb_jasonic__orders_generate
   lsmb_jasonic__timecard_order_generate
   lsmb_jasonic__orders_sales_to_purchase
   lsmb_jasonic__orders_purchase_consolidate
   lsmb_jasonic__orders_sales_consolidate
   lsmb_jasonic__orders_manage
   fely

(2) PostgreSQL log

2017-05-02 07:48:47 UTC ERROR:  permission denied for relation ar
2017-05-02 07:48:47 UTC STATEMENT:
                          SELECT sum(used) FROM (
                  SELECT SUM(ac.amount)
                                 * CASE WHEN 'ar' = 'ar' THEN -1 ELSE 1
END as used
                    FROM ar a
                            JOIN acc_trans ac ON a.id = ac.trans_id and
ac.approved
                            JOIN account_link al ON al.account_id =
ac.chart_id
                                                 AND al.description IN
('AR', 'AP')
                   WHERE entity_credit_account = '0'
                           UNION
                          SELECT sum(o.amount * coalesce(e.buy, 1)) as used
                            FROM oe o
                       LEFT JOIN exchangerate e ON o.transdate = e.transdate
                                                AND o.curr = e.curr
                           WHERE not closed and oe_class_id in (1, 2)
                                 and entity_credit_account = '0') s



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to