githubbob42 / mingle2github2

0 stars 1 forks source link

FX Form not honoring create permission #4114

Open githubbob42 opened 8 years ago

githubbob42 commented 8 years ago

Mingle Card: 4448 Duplicate, closed in favor of card #4993

This should be fixed. Please test on hunterpeak

David is going to fix this with his current work migrating FXForms over to the incremental sync

Steps to Reproduce

| | |
|-|-|
|**Version #**|FieldFX() 4.0.1.3352 on 3.5.5|
|**Hardware**|Laptop|
|**OS**|Windows 7|
|**Browser**|Chrome 52.0.2743.116|
|**Username**|GR Test User (mobile)|
|**Password**|Use LastPass|
|ORG ID|00D37000000KqT5|
|User ID|mmullins@fieldfx.gr.com|
|RayGun Error ID| |
  1. Log in to mobile and navigate to the test Job.
  2. Then click the Forms tab and then the blue plus sign to get to the 2 available FX Forms
  3. Click the tab for Job Spec

Expected Result

The green plus sign to add a new Job Spec record should not appear since this permission set (FX Field User) does not have create permission on this object.

!Field_Permissions.gif!

Actual Result

The field user is able to create a new Job Spec record, which causes a sync error due to the permissions.

!Job_Specs_Create.gif!

!Sync_Error.gif!

Analysis

We should be filtering the list of templates every time they are retrieved to determine which templates are valid for creating.

Related Cards

Could be related to card #4993

Test Plan

githubbob42 commented 7 years ago

Matthew Todd : 02/20/2017 09:30 CST Test Result: Rejected PR Build: 4.0.1.3605 on 9.0.0. Admin User: qaadmin@test4.com Field User: qafield@test4.com Hardware: Surface Pro 3 OS: Windows 10 Pro Browser: Chrome 56.0.2924.87 (64-bit) URL: https://hunterpeak.herokuapp.com Test Case: eForm with Record Types (4448, 4743) Test Notes: With the 'Create' permission unchecked for the 'QA Field' user on the 'Inspection' FXForm, logging in to Mobile and creating a form still results in the green '+' to create the form. The '+' should not be visible.

githubbob42 commented 7 years ago

Matthew Todd : 10/27/2016 14:10 CDT Rejected PR Build: 4.0.1.3459 Admin User: qaadmin@test4.com Field User: qafield@test4.com Hardware: Surface Pro 3 OS: Windows 10 Pro Browser: Chrome 54.0.2840.71 m (64-bit) URL: https://hunterpeak.herokuapp.com Test Case: eForm with Record Types (4448) Removing the 'Create' permission from the field user's permission set and then doing a Sync in Mobile, there's still a green '+' button to create the FXForm. However, clicking the green '+' button takes you back to the Forms tab where 'No Attached Forms' is visible - the form wasn't actually created. Clicking anywhere on this space produces a message in the console, 'TypeError: Cannot read property 'getElementsByTagName' of null(…)'. Screenshot attached for more information.