AngularJs data access Levels - angularjs

I am trying to make a application in springMvc, velocity with html pages and angularJs for ticket booking. This is my first time to use angularJs.
NavBar
Home | Application Setting | Travel | Bulk Booking | Users | Profile | Announcements | Support Mgmt | Support
3 user groups
1. Admin.
2. Normal Users.
3. Agents (with some extra access then Normal).
Access Levels
- Admin - Home, Application Settings , Users, Announcements, Support Mgmt, Profile
- Agent - Home, Bulk Booking, Support, Profile
- Normal Users - Home, Travel, Support,Profile
How to do this with ng-view. Please just point me in right direction. Thanks in advance.

This might be helpful: Authentication in Single Page Applications With Angular.js
directives.js does updateCSS() if user has group (access level is a bitmap of groups) thus showing/hiding menu item.
Menu item would look like
<li data-access-level="accessLevels.admin">
routingConfig.js holds logic "if user has access based on his groups".

Related

Tracking visitors who visited website with a code in url with Google Analytics

I have a React website, I want to build a system that first a code is created for example its "my-special-code-100". I want to track website visitors who entered the website from a url like https://mywebsite.com/../?code=my-special-code-100 and need to track if or if not X 'not signed in' visitor do a successful payment - a button click on specific page - also need to store an account id of the wallet, payment that happened, and need to see trackings of how many visitors of website came with "my-special-code-100"(and other codes) and how many of them made a payment and stored wallet id should be visible for that visited user.
I couldn't be sure how to and is Google Analytics correct tool for this and could you give example what can I use to achieve something like this ? Thanks

Row level filtering with Data Studio and BigQuery - Sharing the dashboard with external users

In order to create external users data-studio dashboard using row level premissions method I followed the instructions here: https://developers.google.com/datastudio/solution/row-level-filtering.
Everything is working fine ,until I got to the sharing part:
Make the dashboard available to users
In order to share the dashboard with external users I need to share the connector script.
Is there a better & safer way to share the dashboard with exteranl users using row level premission method ?
The ability to Filter by email address (Provide row-level security to the data for signed-in users) was released today (13 Feb 2020).
Quoting the steps from the support page:
Create an email filter
1. Edit your data source.
2. In the upper left, click FILTER BY EMAIL.
3. Turn on Filter data by viewer email.
4. Select the field in your data source that contains viewer email addresses.
5. To return to the data source editor, click ALL FIELDS.

How to show selective UI features?

I have a UI that needs to either show icons on a timeline view or not based on user profile. How can I show for some users and not for others? For example : the Sports Admin team needs to see the scores of all teams over time in the view (showing all years visually) but the players (when they login to the same web app) only see the timeline view with their team's performance over the years (not other details for a particular year). How can I achieve this? I am using Angular JS and javascript
I have looked into role based SSO login and show selectively and also cookies. My goal is faster performance - meaning the page needs to load fast.
I was able to find a solution for the problem above that we have been facing. After many design sessions, the best approach was to have a "User Settings" link that would save the preferences at a backend database per user id that's already captured via SSO login. The backend returns data based on the user settings as the queries to get data from backend are now made dynamic to take the selections from User Settings into account while querying the backend. As a result the front end shows data specific to user.
Tested this and seems to work perfectly without any affecting any page load performance whatsoever.

Do I need back-end and database for single page app using Facebook Connect?

I want to create a one page site that will use Facebook Connect and allow my friends to reserve a spot for an upcoming event. Using there Facebook ID I would like my friends to pay(reserve) a spot and then show their Facebook picture in the spot they reserved. Sort of like Meetup.com when you RSVP except its a one page site and for a one time event. Can I build this only using front-end technologies or do I need a backend?
The answer is yes, you will need a back end system to store the paid registrants, print out a list of paid users to have at the door of the event to make sure they paid, store the user id to be able to display their picture, etc. etc. etc.

Update Whole Table every 5 minutes

We currently develop a portal in asp.net mvc2 with fluent nhibernate on amazon cloud servers which have lots of user which buying or selling shares. Also they comment every where and make other activities.
Portal is actually behave like multiple portals which we called Community. Our basic statistics based on users activity (buy,sell, comment etc). We have a basic structure called TopUsers. Which we show top user home page for all topics for loggedin community. On topic page we show top users for current topic etc.
Because of a lot of calculation I want to make a top users table. I am waiting for recommentations for this?
Your approach (separate table that gets periodically repopulated) is correct, except for the interval: your users will not be fanatically clicking on your site every minute to see updated stats, so after a certain threshold of data there isn't much point in refreshing your top users this often. Doing it once per day will usually be good enough.

Resources