-
Notifications
You must be signed in to change notification settings - Fork 908
Charanjeet hacktoberfest#2 #2175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charanjeet hacktoberfest#2 #2175
Conversation
This document explains the User Location Validator solution, detailing how it restricts form submissions based on user location.
This document explains the User Location Validator solution, which restricts ServiceNow form submissions based on user location. It details the functionality of the Script Include and Client Script involved in the validation process.
| var allowedLng = locData.longitude; | ||
| var locName = locData.name; | ||
|
|
||
| var R = 6371; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Charanjet
Could you please explain and add comment here line number 18 ?
| @@ -0,0 +1,4 @@ | |||
| User Location Validator | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add more comments to your read me file with an output ? This will help to understand How the current user location is fetched& get evaluated with defined range.
|
Thanks for your ocntribution, the use case and script looks good with unique contribution. Helpful if you can add more information to readme file and re-open this PR to consider this submission. Please refer comment added to update the script file with more comment that helps to understand for what purpose var R is defined and using static value. |
PR Description:
Adds a dynamic user location validation script, comparing browser geolocation against the user’s assigned location in ServiceNow. Includes both a server-side Script Include and client-side Validator to block form submission if the user is outside the approved area. Folder references for both components are provided in the README.
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions