utility to check app name availability in App Store - javascript

Is there any object or code (javascript, php...) that can be integrated to check if an application name is available in the app store?

If you want to check if a name is available for your app on Apple AppStore, you have to use itunesconnect website, and try to create a new application, it will ask you for the name, if it is not available you will not be able to proceed with the creation of it.
If you want to take the name, finish the creation of the application on itunesconnect, you can always edit it before to submit for the final review.

Related

How can I create a route that take an user to his/her dashboard?

I am working on a platform for different clients, every client is tracking different KPI, therefore a common project cannot be shared due to the models are different.
What I want to do is the following:
The user creates an account
Once, they have created the account, they can log in and see their
dashboard
What I am doing is to create a different file per client for every part of the project (Models, API, server, ctr). For instance; we have 2 clients client A and client A, the project will have a folder called models (which contains the mongoose schema) therefore, I was thinking to create 2 folders inside that folder called model, client_model_A and client_model_B. And, I pretend to do the same for the APIs, the DB connection, and the server.
Just like this:
Do you have any suggestion? Or should I use another method?
No need to copy in files just create a data table name user_configure Than set all configuration in user_configure

How could I manage permissions of jhipster's authorities?

I am coding a webapp using JHipster code generator.
I created 2 extra roles, now I have 5 in total:
ROLE_USER, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_PRESIDENT, ROLE_VICE_PRESIDENT
I was wondering how could I manage their permissions to show some RESTs.
For example, I would like to let the PRESIDENT add new users to database, other simple users should not see the web service that do the work.
Is there a file that I'm ignoring by mistake that could help me with this feature?
Giving thanks in advice for your precious time,
Manuel
Adding new roles to JHipster needs to be added in 2 places.
The obvious one is the AngularJS frontend. To add your new role to user edit view, you add them to the select options in "user-management.controller.js" at vm.authorities = ['ROLE_USER', 'ROLE_ADMIN']
To enforce the role at different places in UI, you either add your roles to the state JS files. Just add them to data.authorities (check user-management.state.js)
If you like to have a template block visible only if a user has the proper role, check out the hasAnyAuthority directive.
The other Part is to secure the backend. If using a current JHipster version and SQL database, authorities are stored in the database. Add your custom roles to authorities.csv of your liquibase migrations.
Last but not least, you can enforce roles in WebSecurityConfiguration or MicroserviceSecurityConfiguration (just look at the existing antMatchers)

How do I get all the teams that the user member is (TFS 2015 extension) using js?

I'm trying to write a plugin for TFS 2015 (its important). I read a couple of manuals. the examples all turns out simply, but it is more difficult with a real plugin. my problem:
-How do I get all the teams that the user member is
i can get current team from web context:
var context = VSS.getWebContext();
var currTeam = context.team;
but how can i get all avaible teams and groups for current user(or by id)?
To get teams for current user
You could get the teams through this method getTeams() directly
IPromise<Contracts.WebApiTeam[]> getTeams(projectId, top, skip)
To get groups for current user
It's not able to do this through js or rest api for now. You could either use tfs command to list the info or use TFS API to achieve what you want. Related method in API: List application groups(), readidentities()
Detail code please refer this question: How to get TFS user groups and users in particular group using TFS API?
Another script solution you could also take a look, just in case you are interested: Using PowerShell and TFS API to list users

SugarCRM Enterprise 6.5 - "app is not defined"

I'm trying to dynamically display a button in the detail view of a given record, depending on its record and the role of the current user. In order to do so, I'm including a custom javascript file in a detail view definition file, in custom/modules/Tasks/metadata/hide.js.
I need to access to the roles of a user, so first I'm trying to access to the user object. However, this fails:
var user = app.data.createBean('Users', {id: app.user.id});
It throws the following error: ReferenceError: app is not defined.
What's the right way to get the user (and then the role) through javascript in SugarCRM Enterprise 6.5?
The code you are using will work only with sugarcrm 7 or later versions.
App variable is not available in sugar 6.5.
You need to write custom api to get user roles.
In php you can get roles like this
global $current_user;
include_once('modules/ACLRoles/ACLRole.php');
$roles = getUserRoleNames($current_user->id);
print_r($roles);

Logged user: what info to send to the browser?

Background: Using MEAN stack to build a web app, I am still learning.
The Issue: I find the following confusing. Say I have a user logged in (I am using Passport.js). From Angular I can retrieve it querying my Node.js server.
What I am doing now is something similar to:
app.get('/userLogged',function(req,res){
res.json({req.user});
});
This does not sound safe to me. I might be a novice, but I have seen this in many tutorials. With a console.log in the browser I can print all the info about the user, including the hashed password. My guess is that I should send a minimal set of information to the browser, filtering out the rest.
My Question: is this safe at all, or I am just leaving the door open to hackers?
Take a look at the concept of ViewModel. It represents the data you want to share publicly with an external user of the system.
What can be achieved in your case, is implementing the right view model out of the data model you store internally. A simplistic example illustrating this concept would be to create a view model for your user object that will pick the data you would like to send back :
// This function will return a different version
// of the `user` object having only a `name`
// and an `email` attribute.
var makeViewModel = function (user) {
return _.pick(user, ['name', 'email']);
}
You will then be able to construct the right view model on demand :
app.get('/user',function (req,res){
res.json(makeViewModel(req.user));
});

Categories

Resources